-
return null when where has no result
hi,
i have a serious problem with a query i wrote.
i structured something like this:
select employee, sum(turnover), sum(profit_margin)
from -table-
where month='april' and status='closed'
group by employee
the problem is when theres an employee not having any turnover and/or profit margin in a project with status other than closed in a specific month his name is not in the result.
but i want his name to be in the list with sum of turnover = null an profit margin = null.
thank u in advance.
if u have any trouble comprehending the problem, please write too, i'll try to explain it better.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|