Subject Re: [firebird-support] Stored Procedure vs Inline Query Results
Author Dimitry Sibiryakov
On 28 Feb 2005 at 6:34, rfrieband wrote:

>procedure returns 1 record with null values in each field. I want to
>test if the query didn't return any records, but with the stored
>procedure I always get a record returned even if there are no matches.
>Is this how stored procedures work in Firebird?

No. This is how your stored procedure is written.

Modify it a bit:

FOR
>SELECT "USER".USERID, BKDN.USERLEVEL
>FROM BKDN, "USER"
>WHERE BKDN.USERNAME =:UNAME
>AND BKDN.PW =:PW
>AND "USER".USERID = BKDN.USERID
>AND BKDN.USERACTIVE = 'Y'
>INTO :UID, :ULEVEL
DO
> SUSPEND;
--
SY, Dimitry Sibiryakov.