I have attached the result of a UNION. Where there are duplicate categories, I do not want the NULL hour/date record. When the NULL hour/date record is the only one for a category, then I want to keep it.
When the How can I do this?
here's the SQL
SELECT Category , annualhours AS Hours, Date AS Date
where EmpUID = 2368 and annualhours > 0 and
(date BETWEEN '1/1/2011' AND '12/31/2011')
select Category, null as hours, null as date from BCS_Training_Categories