Subject Re: [firebird-support] Re: Conditional conundrum
Author Ann W. Harrison
Rick Debay wrote:
> Select
> *
> From
> some_big_join
> Where
> (unit_use in ('U') and :param in ('U')) or
> (unit_use not in ('U') and :param not in ('U'))
>
> The portion of the query that tests a parameter against a value isn't supported in Firebird.

Is 'U' shorthand for a long list of values? Is
Param a field name? The very simple

Where
(unit_use in ('U') and :param = 'U') or
(unit_use not in ('U') and :param not ='U')

suggests itself if not. Alternately, you could use EXECUTE
STATEMENT to build up your query.

Regards,


Ann