Subject | Re: [ib-support] Procedure problem |
---|---|
Author | Lauri Zoova |
Post date | 2002-12-21T11:46:37Z |
The DeerBear wrote:
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
> 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