Subject Re: [ib-support] Another newbie SP question (variables)
Author Lucas Franzen
jmartine3 schrieb:
>
> 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?

You can't build a string and use it as a parameter for an IN clause.

Instead of building your keylist, delete the records right away with the
appropriate key.

Luc.