Subject Re: [firebird-support] Is this possible with a function ?
Author Mr. John
Thomas Steinmaurer THANKS A LOT !!!!!
I just added a SUSPEND statement to my proc and your suggestion works !




________________________________
From: Thomas Steinmaurer <ts@...>
To: firebird-support@yahoogroups.com
Sent: Sunday, September 20, 2009 12:01:47 PM
Subject: Re: [firebird-support] Is this possible with a function ?


> I have a function FUNC_SOLD that returns a single numeric value,not a selectable SP.
>
> 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

If FUNC_SOLD *is* a selectable SP, then you could try:

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/






[Non-text portions of this message have been removed]