Subject Re: [ib-support] Working with arrays
Author Jaume Andreu Sabater Malondra
On Monday 09 September 2002 14:48, Dimitry Sibiryakov wrote:

> Constructing DSQL statement on the client side (as a matter of fact
> you can't use DSQL anywhere else), you can use NOT IN (<list of
> values>).

Hmmm.. as you said, this doesn't work inside a stored procedure, althought I
can't guess why. :-(

> If you really have to do this inside of stored proc, try this:
>
> DELETE FROM TABLE
> WHERE (FIELD_A = :P_PARAM)
> AND (','||P_LIST||',' NOT LIKE '%,'||CAST(FIELD_B AS VarChar)||',%');

This worked absolutely fine, Dimitry :-)
I just had to remove the CAST code (FIELD_B is integer, but it was returning
an error when adding the CAST code, and it's working fine without it).

Thanks a lot, Dimitry! ;-)

--
Jaume Andreu Sabater Malondra
jsabater@...
Registered linux user #209072

"Ubi sapientas ibi libertas"