Subject Re: [ib-support] Procedure problem
Author Lauri Zoova
The DeerBear wrote:
> What's the correct way to write an SP that returns a result set?

CREATE PROCEDURE FIND_USER (
USR_NAME VARCHAR(10),
PWD VARCHAR(20))
RETURNS (
[field1] [type],
[field2] [type],
...)
AS
begin
for SELECT field1, field2, ...
FROM accounts
WHERE "USER_NAME"=:usr_name
AND "password"=:pwd
INTO :field1, field2, ...
do
suspend;
end


BR,
Lauri