Subject Re: Writing A Stored Procedure ??
Author Alexander V.Nevsky
--- In firebird-support@yahoogroups.com, Anand <akashelkar@y...>
wrote:
> Whatever I try to do, it gives me an error when compiling, flagging
up the IF statement

Anand,

IF (tmp_count = 0) then

BTW, one of old programmers rules: nobody yet died because of
superluos pair of parenthesises, but many people had much troubles
omiting needed pair :)
Colon usage with identifiers names is needed in SQL statements only
and when used outside them sometimes provides wrong result.
One more BTW: much more effective will be not Count, but

If (Not Exist (Select FROM CC_USERS WHERE
DR_ID=:"str_DR_ID" AND
CC_USER=:"int_USER_ID" ))
then ...

Best regards, Alexander.