Subject Re: [firebird-support] IN function
Author Dmitry Yemanov
yartax1 wrote:
> I want to do next query within a procedure:
> Select * from table where field_integer in ( :mylist )
> Where mylist is a variable with data as like as '123,345,342'. I
> suppose that fb considers field as numeric and commas are considered
> as decimal point.

IN is not supposed to work the way you want it to. Your search condition
means the same as just: field_integer in ( '123,345,342' ). This is
treated as a single value, not as a comma-separated list.

> In any case how can I do a similar where clausule without doing
> another query or creating a temporal table?

Something like this:

select * from table
where ',' || :mylist || ',' containing ',' || field_integer || ','