finding empty data in database
This is my second post here. This is probably one of the most helpful forums out there! =)
I have a database with perhaps the following:
How do I write my SQL statement to retrieve only empty Data?
SQL="Select ID,Data From table WHERE Data='' " 'does not retrieve anything
I actually need to count how many blank data there are in the database, and response.write the corresponding ID
The problem is Data could be an empty string '', it could be null, it could be just blank, we dont know. I dont know what else it could be.
Anyone done something like this before?
Hello, one of two should probably work...
Whether it is null or a blank string will depend on the column data type and wheter it is set to non-null/required.
"SELECT ID, Data FROM table WHERE Data = ''"
"SELECT ID, Data FROM table WHERE Data IS NULL"
Last edited by schizo; 11-28-2005 at 06:34 PM.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)