Subject Re: [firebird-support] IF ELSE in Select Statement
Author Helen Borrie
At 02:29 PM 28/02/2005 +0100, Ivan Prenosil wrote:

> > 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';

Cute! :-)

./hb