Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 NULL summary data

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-06-08 : 08:48:48
jay writes "hey guys...

I need to show summary data by month for hours that may or may not have accrued during a particular month. Example...I have a project that last 12 months. Let's say that the entire project team took the month of May off and there are NO entries in the table for the month of May whatsoever. I need to show how many hours for each month of the Project were worked, including the 0 (zero) hours worked in May.

I obviously cannot use SUM as it will completely skip the month of May. There is a Month table that lists all the possible months and their fiscal years, etc. There is a FK relationship to the table that holds the hour information.

I've tried using cross joins and correlated sub queries and outer joins, all with no luck. Please Help...

jay-

I'm using SQL Server 7 on NT 4"
   

- Advertisement -