I am writing a SQL statement to return any information based on one criteria. Here's my sample code:
Select Resource_Name, Resource_Manager_Name, sum(weekly_hours) as Weekly_Hours from #Hours
group by resource_name, Resource_Manager_Name
having sum(weekly_hours) = 0
I am using the temp table #Hours to figure out which employees did not put in time for last week ordered by manager. What I want to do is to display the manager name on a Crystal Report regardless if all employees put in time or not from last week. However, I understand that this SQL statement will only return information if the criteria has been met. How can I still get the manager name whether or not the criteria has been met? Please help. Thanks.
Select Resource_Name, Resource_Manager_Name, sum(weekly_hours) as Weekly_Hours from #Hours
group by resource_name, Resource_Manager_Name
having sum(weekly_hours) = 0
I am using the temp table #Hours to figure out which employees did not put in time for last week ordered by manager. What I want to do is to display the manager name on a Crystal Report regardless if all employees put in time or not from last week. However, I understand that this SQL statement will only return information if the criteria has been met. How can I still get the manager name whether or not the criteria has been met? Please help. Thanks.