jarxt8
10-06-2008, 11:07 AM
I need some help creating a report from this database that I've got. I'm using Microsoft SQL Server 2005. It's going to be populated with data coming in at different time intervals, so some columns will receive data at one time interval and other columns will receive it at a different time interval. Using this method a lot of columns are going to be receiving zeros as only one column might get updated. Not the way I wanted to do it, but its the boss's orders so I've got to figure it out.
Right now though, I am wondering how I can write a select statement so that I pull all the data out between two certain dates and consolidate that info by day, so lets say I want column A, C and E for the report and I want it between october 3rd and 6th. So I'd have 4 rows for Oct 3, 4, 5 and 6 with values in the columns once for each day, no zeros.
I hope I'm making sense with this question. Now is there a way to write this query or should I just go back to the boss and say "Hey, we need to make new tables based on time intervals instead of throwing it all into one table."?
Right now though, I am wondering how I can write a select statement so that I pull all the data out between two certain dates and consolidate that info by day, so lets say I want column A, C and E for the report and I want it between october 3rd and 6th. So I'd have 4 rows for Oct 3, 4, 5 and 6 with values in the columns once for each day, no zeros.
I hope I'm making sense with this question. Now is there a way to write this query or should I just go back to the boss and say "Hey, we need to make new tables based on time intervals instead of throwing it all into one table."?