Subject Re: [firebird-support] SELECT ... INTO in PSQL
Author Helen Borrie
At 02:17 PM 30/06/2004 +0200, you wrote:
>Hi Martijn, Helen and Lucas,
>
>thanks for your answers and recommendations.
>The way you all explained it made sense to me.
>
>In this case, my problem was related to IBExpert because
>as a result to a select which returns no row, IBExpert
>shows "<null>". So I thought that in my SP, the result would
>be NULL if no row was found.
>IBExpert is great, but sometimes it pollutes the "purity"
>of FB ;-)
>Anyway, I should have known that.
>
>A little question concerning your suggestions concerning colons
>before local variables: in some cases, the use of colons is not
>enforced, that means that you are able to use the local variable
>without a preceeding colon.
>
>Is it only bad practice to do this or does it also have
>other negative implications?

It's wrong practice. The rule is: always use a colon on a variable when
you use the variable in an SQL statement and never use one otherwise.

What DB version are you using? It should be throwing an "Unknown field"
exception when you don't reference variables properly...

/heLen