Subject | Re: [firebird-support] null stored procedure? |
---|---|
Author | Helen Borrie |
Post date | 2004-06-20T11:24:51Z |
At 10:15 AM 20/06/2004 +0000, you wrote:
it's illegal. Although the reason for the rule might seem a bit obscure,
it's simple: it's possible to have variables (local, input args, output
args) that have the same names as columns from tables. Therefore, whenever
you involve a variable in an SQL statement, you mark it with a colon. When
you use it in a PSQL statement, no colon.
/heLen
>Hi all,Yup: the colon is illegal here.
>This is probably obvious but what is wrong with this stored
>procedure? I
>get the error invalid character ":" Can I not do this?
>
>begin
> if (:suptype is null) then
> begin
> :suptype = 'type';The rule about the colon is: it is required in SQL statements; otherwise
> end
it's illegal. Although the reason for the rule might seem a bit obscure,
it's simple: it's possible to have variables (local, input args, output
args) that have the same names as columns from tables. Therefore, whenever
you involve a variable in an SQL statement, you mark it with a colon. When
you use it in a PSQL statement, no colon.
/heLen