Hi,
confused with this, and I shouldn't be!

(I wonder if I should be using CASE at all)

I want to get a resultset of the two values (page_block_name, sequence_number), where the category is 'pages'. if there are no records in that category I want only to return the values where the category is NULL.

what should I be doing?


Code MySQL:
select page_block_name
,sequence_number
,case when
page_category = 'pages' then 1
else 0
end
from page_blocks_set
where business_id = 477
and ( page_category = 'pages'
or page_category is NULL)


bazz