Subject | Re: [firebird-support] IF ELSE in Select Statement |
---|---|
Author | Helen Borrie |
Post date | 2005-02-28T13:41:36Z |
At 02:29 PM 28/02/2005 +0100, Ivan Prenosil wrote:
./hb
> > I want to do something like this:Cute! :-)
> >
> > 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';
./hb