Subject | Re: [firebird-support] Switch statement in FIREBIRD |
---|---|
Author | Milan Babuskov |
Post date | 2009-12-04T15:49:40Z |
Mr. John wrote:
In that case, you need to select from them. Instead of EXECUTE use (
SELECT * FROM PR1) , etc.
--
Milan Babuskov
==================================
The easiest way to import XML, CSV
and textual files into Firebird:
http://www.guacosoft.com/xmlwizard
==================================
> Hi, I use firebird 2.1I assume PR1, PR3 and PR3 return a single column?
> I have inside SP :
> IF (NEW.TIP=1) THEN EXECUTE PROCEDURE PR1
> IF (NEW.TIP=6) THEN EXECUTE PROCEDURE PR2
> IF (NEW.TIP<>6 AND NEW.TIP<>1) THEN EXECUTE PROCEDURE PR3
>
> And I want something like this :
>
> SELECT CASE (NEW.TIP)
> CASE 1
> EXECUTE PROCEDURE PR1
> CASE 6
> EXECUTE PROCEDURE PR2
> CASE ELSE
> THEN EXECUTE PROCEDURE PR3
> END CASE
In that case, you need to select from them. Instead of EXECUTE use (
SELECT * FROM PR1) , etc.
--
Milan Babuskov
==================================
The easiest way to import XML, CSV
and textual files into Firebird:
http://www.guacosoft.com/xmlwizard
==================================