I have a table in which there are two columns. One column is id and the other is value. When I try to retrieve the data that is not empty it gives me unwanted error. I have to apply join to some tables as well. My query is something like this SELECT count(DISTINCT ID) FROM Tbl inner join tbl1 on tbl.id=tbl1.id WHERE id IN(1,2,3) and value!=''.But it also resturns the values that are empty. Can anyone help. Thanks in advance.
Jump to Post
Do you have any NULL values in your database? Because then you would have to append "AND value IS NOT NULL" to your query :).
All 7 Replies
We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.