Subject | Re: [firebird-support] Writing A Stored Procedure ?? |
---|---|
Author | Paul Vinkenoog |
Post date | 2003-07-22T12:04:49Z |
Hi Anand,
recognize the IF token.
Then, as Alexander said, the boolean expression in an IF clause *must*
be between (). And tmp_count doesn't need the colon here:
Greetings,
Paul
> beginAdd a semicolon after the above line - this is why the parser doesn't
> /* Procedure Text */
> SELECT COUNT(*) FROM CC_USERS WHERE DR_ID=:"str_DR_ID" AND
> CC_USER=:"int_USER_ID" into :tmp_count
recognize the IF token.
Then, as Alexander said, the boolean expression in an IF clause *must*
be between (). And tmp_count doesn't need the colon here:
> IF :tmp_count = 0 thenAlso needs ';'
> INSERT INTO CC_USERS VALUES (:"str_DR_ID", :"int_USER_ID")
> suspend;Last advice: follow Alexander's advice about the EXISTS option ;-)
> end
Greetings,
Paul