Subject | Error in making stored procedure |
---|---|
Author | Sudarshan Wad |
Post date | 2003-08-29T05:18:16Z |
hi,
I am sudarshan.I am working on project involving firebird 1.0 as a
database.I have to write a stored procedure which takes integer as a
parameter and has some local variables and stored procedure will only
do all deleting.Offcourse i can write trigger as well.
Code as simple as like this-->
CREATE PROCEDURE X(
A integer
)
AS
BEGIN
delete from job where id=:a;
SUSPEND;
END ;
gives me errors -->
1)
Statement #1:
Dynamic SQL Error
SQL error code = -104
Unexpected end of command
CREATE PROCEDURE X(A integer)AS BEGIN delete from job where id=:a;
2)
Statement #2:
Dynamic SQL Error
SQL error code = -104
Token unknown - line 2, char 1
SUSPEND
3)
Statement #3:
Dynamic SQL Error
SQL error code = -104
Token unknown - line 2, char 1
END
Can any one tell me why these errors are comming.I referred to site:-
http://www.ibphoenix.com/a498.htm
so check for how to write stored procedures and triggers.I found same
format.
If anyone knows the answer please let me know.
Thank you
sudarshan
I am sudarshan.I am working on project involving firebird 1.0 as a
database.I have to write a stored procedure which takes integer as a
parameter and has some local variables and stored procedure will only
do all deleting.Offcourse i can write trigger as well.
Code as simple as like this-->
CREATE PROCEDURE X(
A integer
)
AS
BEGIN
delete from job where id=:a;
SUSPEND;
END ;
gives me errors -->
1)
Statement #1:
Dynamic SQL Error
SQL error code = -104
Unexpected end of command
CREATE PROCEDURE X(A integer)AS BEGIN delete from job where id=:a;
2)
Statement #2:
Dynamic SQL Error
SQL error code = -104
Token unknown - line 2, char 1
SUSPEND
3)
Statement #3:
Dynamic SQL Error
SQL error code = -104
Token unknown - line 2, char 1
END
Can any one tell me why these errors are comming.I referred to site:-
http://www.ibphoenix.com/a498.htm
so check for how to write stored procedures and triggers.I found same
format.
If anyone knows the answer please let me know.
Thank you
sudarshan