google-code-export / ords

Automatically exported from code.google.com/p/ords
1 stars 0 forks source link

Can't search for null values #607

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a conditional SQL query
2. Notice that there is no way to search for null values
3.

What is the expected output? What do you see instead?
People may wish to do this to identify records that need additional work, but 
at present it's not possible

Please use labels and text to provide additional information.
dev 1.0.7~ox.0 - 4038, IE

Original issue reported on code.google.com by jajwil...@gmail.com on 26 Jan 2015 at 3:50

GoogleCodeExporter commented 9 years ago
Hi James,
Please can you provide a bit more information - what you were attempting to do, 
what you expected to see, what wasn't there when you expected?

Original comment by marxjohn...@gmail.com on 26 Jan 2015 at 3:55

GoogleCodeExporter commented 9 years ago
Something along the lines of SELECT * FROM city WHERE population='[null 
value]', although I also think i tried various other versions of this, such as 
'', 'NULL', "", etc. Population at this point was a text field. It's not the 
highest priority issue.

Original comment by jajwil...@gmail.com on 27 Jan 2015 at 9:51

GoogleCodeExporter commented 9 years ago
Hi James
The correct SQL syntax for that example would be,
SELECT * FROM city WHERE population IS NULL

In SQL terms, if a field is null it contains so value, so isn't considered 
"equal to" anything
http://www.postgresql.org/docs/current/static/functions-comparison.html

As this isn't an issue with ORDS, I'll close it as Invalid.

Original comment by marxjohn...@gmail.com on 27 Jan 2015 at 9:56