Subject | RE: [firebird-support] Stored Procedure ?? |
---|---|
Author | Steffen Heil |
Post date | 2004-06-03T20:02:45Z |
Hi
the SELECT statement out it compiles no problem. Can one of you folks
please help? Thanks.
is forbidden.
You need to specify what to do with the result:
SELECT MAX(FIELD) FROM TABLENAME INTO :VARIABLE;
If there is more then one result, do:
FOR SELECT FIELD FROM TABLENAME INTO :VARIABLE DO BEGIN
...
(maybe SUSPEND;)
END
Regards,
Steffen
------------------------ Yahoo! Groups Sponsor --------------------~-->
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/67folB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
> I'm a SQL Server guy so forgive the ignorance here. I'm trying to embed aSELECT statement into a Stored Procedure, but it won't compile. If I take
the SELECT statement out it compiles no problem. Can one of you folks
please help? Thanks.
> ALTER PROCEDURE "TEST"What shall this do? Do a select and forget it? This makes no sence. Hence it
> AS
> BEGIN
> SELECT * FROM IPCSENSOR;
> EXIT; END
is forbidden.
You need to specify what to do with the result:
SELECT MAX(FIELD) FROM TABLENAME INTO :VARIABLE;
If there is more then one result, do:
FOR SELECT FIELD FROM TABLENAME INTO :VARIABLE DO BEGIN
...
(maybe SUSPEND;)
END
Regards,
Steffen
------------------------ Yahoo! Groups Sponsor --------------------~-->
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/67folB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links