THANKS EVERYONE - GREAT RESULT!
Hi everyone - I should have explained in more detail - there is no line that matches this crieria, and therefore the current query result is correct (i.e. zero lines), but is it possible to get MySQL to return this instead?
q1 q2 q3 NULL NULL NULL
I suspect not one of the answers below!
Greetings
N.
Hello to all,
It may be a really, very simple question, but I'm at a standstill!
I have the following query:
SELECT q1, q2, q3 FROM tresults WHERE date = 'NOV2010' AND brand = 'XYZ'
Now, if q1, q2 and q3 are empty for NOV2010 and XYZ, the result of the query:
MySQL returned an empty result set (ie zero rows).
However, I need to force MySQL to return NULL instead, for example, a query will result in:
q1 q2 q3 NULL NULL NULL
I am sure that he is dead, but, as I said, I'm at a standstill.
Thanks,
Homer.
source share