Subject Re: [firebird-support] Why is this telling me
Author Pavel Menshchikov
Hello Clay,

CS> Why does this SQL:

CS> update clients c1
CS> set c1.client_id =
CS> (select min(c2.client_id) from clients c2
CS> where (c2.firstname = c1.firstname) and
CS> (c2.middlename = c1.middlename) and
CS> (c2.lastname = c1.lastname))

CS> Tell me "Validation error for column client_id value "***null***"

CS> There are no nulls in that column.

And what about nulls in firstname, middlename and lastname? Even if
one of them contains null, equation would be evaluated to null, and
then entire logical expression would be evaluated to null -> false.
Hence, subselect would return no records, i.e. null.

Best regards,
Pavel Menshchikov