Subject | Re: [firebird-support] Is this possible with a function ? |
---|---|
Author | Thomas Steinmaurer |
Post date | 2009-09-20T09:01:47Z |
> I have a function FUNC_SOLD that returns a single numeric value,not a selectable SP.If FUNC_SOLD *is* a selectable SP, then you could try:
>
> CREATE OR ALTER PROCEDURE FUNC_SOLD(p_year INTEGER,p_month INTEGER,p_day SMALLINT) RETURNS (SOLD NUMERIC(16,4)) AS ......
> ................................
>
> I want to use this function into a SELECT statement passing fields as params,something like this :
>
> SELECT a.year,a.month,a.daty,FUNC_SOLD(a.year,a.month,a.day) as sold FROM mytable
select
a.year
, a.month
, a.day
, (select sold from func_sold(a.year, a.month, a.day)) as sold
from
mytable a
--
Best Regards,
Thomas Steinmaurer
LogManager Series - Logging/Auditing Suites supporting
InterBase, Firebird, Advantage Database, MS SQL Server and
NexusDB V2
Upscene Productions
http://www.upscene.com
My blog:
http://blog.upscene.com/thomas/