Subject | Re: [firebird-support] IF ELSE in Select Statement |
---|---|
Author | Ivan Prenosil |
Post date | 2005-02-28T13:29:10Z |
> I want to do something like this:Select * From TEST_TBT
>
> 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.
Where (i=1) AND (Field_1 = 'AAA') OR (i=2) AND Field_2 = 'BBB';
Ivan