Subject Fw: Stored Procedure
Author monalisa
----- Original Message -----
From: "monalisa" <monalisa@...>
To: <delphi-programming@yahoogroups.com>
Sent: Sunday, September 29, 2002 4:46 PM
Subject: Stored Procedure


> Hi All,
> I need help with the simple Stored Procedure :
>
> I have Table STOCKIN with record :
>
> DATE REFFNO STATUS
>
> 1/1/2002 2002000001 IN
> 1/2/2002 2002000002 IN
>
> I made Stored Procedure with this statement :
>
> SET TERM !!;
> CREATE PROCEDURE MAXOFREFF
> RETURNS (NUMIN CHAR(10)) AS
> BEGIN
> SELECT MAX(REFFNO) FROM STOCKIN
> WHERE STATUS='IN'
> INTO :NUMIN;
> END !!
>
> SET TERM ; !!
>
> The operation execute successfully.
> But when I call the procedure with :
>
> SELECT * FROM MAXOFREFF
>
> The return value always <NULL>
>
> So what's wrong with My Code ? I still use Interbase 6.01 with open souces
> version.
> Thanks for all helped !
>
> Regards,
> Mona.
>
>
>
>