Subject Re: [firebird-support] IF ELSE in Select Statement
Author Ivan Prenosil
> I want to do something like this:
>
> Select * From TEST_TBT
> If (i=1) Then
> Where Field_1 = 'AAA'
> Else If (i=2) Then
> Where Field_2 = 'BBB'
>
> Note = i is an Input Parameter in procedure. And this Select
> statement is used inside procedure.

Select * From TEST_TBT
Where (i=1) AND (Field_1 = 'AAA') OR (i=2) AND Field_2 = 'BBB';

Ivan