Change = to IS and see what happens Ade
-----Original Message----- From: David K [mailto:[EMAIL PROTECTED] Sent: 23 July 2003 17:37 To: CF-Talk Subject: SOT: NULL Madness <Brain_Cramp> Trying to do a simple select query that selects all records with an empty value in an integer column. The table contains 122 records where 12 records have an empty value in the target column. Here's my query... <cfquery name="getData" datasource="cfDS"> SELECT * FROM tblCustomers WHERE orderCount = NULL </cfquery> ...which returns *0* records in the result set. However, if I run this query... <cfquery name="getData" datasource="cfDS"> SELECT * FROM tblCustomers WHERE orderCount <> NULL </cfquery> ...the result set contains 110 records as expected. Isn't the second query the logical opposite of the first? If yes, why does the first query not return 12 records? What is the correct query syntax to return a result set containing those 12 records? </Brain_Cramp> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

