Subject | Re: [firebird-support] Conditional syntax in stored procedure? |
---|---|
Author | Helen Borrie |
Post date | 2004-06-21T22:11:38Z |
At 09:40 PM 21/06/2004 +0000, you wrote:
DoSomeCoolStuff;
else if (not (this and that)) then
DoSomeOtherCoolStuff;
i.e. in PSQL, conditions must always be bracketed. Note also the
terminator at the end of the IF branch.
Same applies to WHILE. And you have to be careful to "block" compound
statements with BEGIN and END...and END never takes a terminator inside the
body of the procedure.
/heLen
>Hi All,if (this and that and theother) then
>
>How would I convert this Delphi code to a stored procedure?
>
>if this and that and theother then
> DoSomeCoolStuff
>else if (not (this and that)) then
> DoSomeOtherCoolStuff;
>
>The stored procedure doesn't seem to like the "and" operator and I
>don't find a reference to an alternative.
DoSomeCoolStuff;
else if (not (this and that)) then
DoSomeOtherCoolStuff;
i.e. in PSQL, conditions must always be bracketed. Note also the
terminator at the end of the IF branch.
Same applies to WHILE. And you have to be careful to "block" compound
statements with BEGIN and END...and END never takes a terminator inside the
body of the procedure.
/heLen