We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Submitted by: mauro russo (mrusso)
the query
select distinct (case NULL when NULL then 0 else 1 end) as v from RDB$DATABASE
wrongly returns 1
whereas the query
select distinct (case when NULL is NULL then 0 else 1 end) as v from RDB$DATABASE
correctly returns 0
The text was updated successfully, but these errors were encountered:
Commented by: @asfernandes
There is no problem here.
The first form compares NULL = NULL, which is obviously false.
The first form equivalent is: select distinct (case when NULL = NULL then 0 else 1 end) as v from RDB$DATABASE
Sorry, something went wrong.
status: Open [ 1 ] => Resolved [ 5 ]
resolution: Won't Fix [ 2 ]
Commented by: @paulvink
Indeed this is 100% correct.
See http://www.firebirdsql.org/manual/nullguide-conditionals-loops.html#nullguide-case
status: Resolved [ 5 ] => Closed [ 6 ]
No branches or pull requests
Submitted by: mauro russo (mrusso)
the query
select distinct (case NULL when NULL then 0 else 1 end) as v from RDB$DATABASE
wrongly returns 1
whereas the query
select distinct (case when NULL is NULL then 0 else 1 end) as v from RDB$DATABASE
correctly returns 0
The text was updated successfully, but these errors were encountered: