Subject IN LIST
Author Adriano dos Santos Fernandes
Hi!

There are many times that the database developer can't predict (it's
dependent on the user) an interval of records that your statement will act.

Example:
select * form t where id in (1, 5, ...)
or
select * from t where id between 5 and 10 or id between 20 and 30 or
id = 50

In these situations, who like to develop triggers/SPs should use EXECUTE
STATEMENT losing the ability to handle errors early.

Hence, a way to pass indeterminate number of intervals is very great:
select * from t where id in list '5-10,20-30,50'

And I see this syntax as a complement to FB2.1 LIST aggregate function,
i.e. result of LIST can be passed to IN LIST. Example:
select list(id) from t into :ids;
for select * from t where id in list :ids ...

Comments?


Adriano