Subject | Re: [firebird-support] Switch statement in FIREBIRD |
---|---|
Author | Milan Babuskov |
Post date | 2009-12-04T16:32:13Z |
Mr. John wrote:
some value? If you just want to execute procedure which does not return
any database, you shouldn't SELECT at all - select should be used only
when you want to retrieve some data.
In short, I don't think there is a switch statement equivalent in PSQL.
Use IF, ELSE IF and ELSE instead:
if (new.tip = 1) then execute procedure pr1;
else if (new.tip = 6) then execute procedure pr2;
else execute procedure pr3;
--
Milan Babuskov
==================================
The easiest way to import XML, CSV
and textual files into Firebird:
http://www.guacosoft.com/xmlwizard
==================================
> Thanks Milan.But what is the end result: execution of a statement or retrieval of
> I'm looking for a C++ swich functionality
some value? If you just want to execute procedure which does not return
any database, you shouldn't SELECT at all - select should be used only
when you want to retrieve some data.
In short, I don't think there is a switch statement equivalent in PSQL.
Use IF, ELSE IF and ELSE instead:
if (new.tip = 1) then execute procedure pr1;
else if (new.tip = 6) then execute procedure pr2;
else execute procedure pr3;
--
Milan Babuskov
==================================
The easiest way to import XML, CSV
and textual files into Firebird:
http://www.guacosoft.com/xmlwizard
==================================