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.
Author |
Topic |
Splics
Starting Member
39 Posts |
Posted - 2006-02-23 : 14:46:38
|
I am writing a report from an historical database that uses posting_times. The way the posting works is if something has a posting time of 01/01/97 00:00:00 it means that the record covers from 12/31/96 00:00:00 to 01/01/97 00:00:00. This is where my problem is at. The report i am writing needs to be grouped by Month. Before i figured out how the posting dates worked i was using ... DATEPART(month, posting_time) AS monthDate ... for grouping purposes in the report. Now that i have figured out how the posting dates work i am at a total loss as how to group this. I am using SQL Reporting Services 2000 to write this report. Any help would be greatly appreciated.ThanksMitch |
|
AndrewMurphy
Master Smack Fu Yak Hacker
2916 Posts |
Posted - 2006-02-24 : 10:18:11
|
how about subtract 1 second (on the fly) from the end dates and then group on the result??? |
|
|
Splics
Starting Member
39 Posts |
Posted - 2006-02-24 : 12:18:55
|
Thanks for the reply ... are you familiar with Reporting Services? |
|
|
AndrewMurphy
Master Smack Fu Yak Hacker
2916 Posts |
Posted - 2006-02-24 : 12:21:40
|
I don't use that particular subproduct of SQLServer, but can you simulate what you need datawise in any way in regular SQL and then apply the lessons learned onwards?? |
|
|
Splics
Starting Member
39 Posts |
Posted - 2006-02-24 : 12:38:25
|
Thanks it worked perfectly. I have been working on this all week and you solved it in 2 seconds ... thanks alot.Mitch |
|
|
AndrewMurphy
Master Smack Fu Yak Hacker
2916 Posts |
Posted - 2006-02-27 : 04:09:19
|
That comes from a lot available for lateral thinking, due to amount of time spent in a horizontal position from ducking the amount of cr*p that gets throw at me at work!!!Glad you are motoring!!! |
|
|
|
|
|