Subject | Another newbie SP question (variables) |
---|---|
Author | jmartine3 |
Post date | 2003-05-07T07:56:38Z |
In my stored procedure, the following line is giving me an error:
delete from mytable where myid in (:KILL_LIST);
It's saying "token unknown" on the colon.
KILL_LIST is defined at the beginning of the body as:
DECLARE VARIABLE KILL_LIST VARCHAR(30000);
Before the delete statement, I'm building a list of keys to delete in
the KILL_LIST variable, and I wanted to pass that list to the delete
command.
What am I doing wrong?
-Joe
delete from mytable where myid in (:KILL_LIST);
It's saying "token unknown" on the colon.
KILL_LIST is defined at the beginning of the body as:
DECLARE VARIABLE KILL_LIST VARCHAR(30000);
Before the delete statement, I'm building a list of keys to delete in
the KILL_LIST variable, and I wanted to pass that list to the delete
command.
What am I doing wrong?
-Joe