Subject Re: Optional parameter in a select statement
Author m_formigoni
> select * from LogTable
> where (User = :User)
> select FIRST ( CASE WHEN :User='-1' THEN 1000000000 ELSE 0 END ) *
from LogTable

Thanks a lot by the help, but unfortunately it doesn't solve my
problem... If the select had a single parameter it was ok, but there
are many others and I would have lots of UNION...

I used to do the way I wrote above in Sybase and the indices where
found without problem... That's the reason of my question.

Well, I'm going to dynamically write the where clause...

Does anybody knows if the FB has anything like:

declare variable command varchar(1000);
select 'select * from TABLE' from RDB$DATABASE into :command;