THANKS EVERYONE - GREAT RESULT!
Hi all - I should have explained in further detail - there is NO row that matches that crieria and therefore the current result of the query is correct (i.e zero rows) but is it possible to force MySQL to return this instead?
q1 q2 q3
NULL NULL NULL
I suspect not from the responses below!
Cheers,
H.
Hi all,
This maybe a really, really simple question but I'm stumped!
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 is:
MySQL returned an empty result set (i.e. zero rows).
What I need however, is to force MySQL to return NULL instead, for example the query would result in:
q1 q2 q3
NULL NULL NULL
I'm sure it is dead simple but, as I say, I'm stumped.
Thanks,
Homer.