Subject | Re: [firebird-support] NULL confusion, again |
---|---|
Author | Dimitry Sibiryakov |
Post date | 2006-04-21T04:54:37Z |
On 20 Apr 2006 at 8:25, t.s. wrote:
records.
return at least one record. Your query returned one record with NULL
value and thus the variable was changed.
--
SY, Dimitry Sibiryakov.
>Again, if i understood Ms Helen Borrie's message correctly, if theNot so. The variable will not be affected if select returns no
>select returns NULL, the variable total will not be affected, so it
>will be still be zero.
records.
>Since the tables are empty, the result of the variable TOTAL is alwaysIn this case you use SUM(). Aggregate queries like this _always_
>NULL inside this stored procedure (Firebird 1.5.3, Win32). This kinda
>contradicts my conclusion above (about how a SELECT INTO that returns
>a NULL will not affect the variable value).
return at least one record. Your query returned one record with NULL
value and thus the variable was changed.
--
SY, Dimitry Sibiryakov.