Subject | Re: [ib-support] Procedure problem |
---|---|
Author | Milan Babuskov |
Post date | 2002-12-21T11:43:43Z |
The DeerBear wrote:
USR_NAME VARCHAR(10),
PWD VARCHAR(20))
AS
BEGIN
SELECT * FROM accounts WHERE "USER_NAME"=:usr_name AND "password"=:pwd
...
END
And some other things too... depending on what should your procedure do.
Please take a look at Interbase Data Definiton Guide for complete syntax.
Milan.
> Hello,CREATE PROCEDURE FIND_USER (
>
> Here it is my SP:
>
> ---------- STATEMENT ----------
>
> CREATE PROCEDURE FIND_USER (
> USR_NAME VARCHAR(10),
> PWD VARCHAR(20))
> AS
> SELECT * FROM accounts WHERE "USER_NAME"=:usr_name AND "password"=:pwd
>
>
>
> ---------- ERROR MESSAGE ----------
>
> Invalid token.
> Dynamic SQL Error.
> SQL error code = -104.
> Token unknown - line 5, char -1.
> SELECT.
>
> What's the correct way to write an SP that returns a result set?
USR_NAME VARCHAR(10),
PWD VARCHAR(20))
AS
BEGIN
SELECT * FROM accounts WHERE "USER_NAME"=:usr_name AND "password"=:pwd
...
END
And some other things too... depending on what should your procedure do.
Please take a look at Interbase Data Definiton Guide for complete syntax.
Milan.