SELECT where column could have 2 values.
Posted: Thu Oct 23, 2008 6:55 pm
Hi everyone, what I'm getting stuck on is when I initially create a row I'm not filling all the fields. Therefore some fields are 'NULL' to start with. Later on, I put some data in them but if I want to delete that data (i.e. fill with blank) the field is no longer NULL.
This means that my SELECT that lists everything where the cells contain NULL doesnt give the result I want any more! (WHERE variable IS NULL)
Is there a way to do something like: WHERE variable IS NULL OR ""
?
If anyone has any idea then thanks v much. I realise I could fill all fields with blank initially, but it makes my INSERT queries rather long.
This means that my SELECT that lists everything where the cells contain NULL doesnt give the result I want any more! (WHERE variable IS NULL)
Is there a way to do something like: WHERE variable IS NULL OR ""
?
If anyone has any idea then thanks v much. I realise I could fill all fields with blank initially, but it makes my INSERT queries rather long.