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 |
NewToRS
Starting Member
1 Post |
Posted - 2009-10-05 : 08:15:00
|
I’m new to MS SQL world and Reporting Services. My question relates to using the DATEDIFF function on DATATIME data on different rows. Simple example:TABLE1… … … EventName [varchar(50)] EventDateTime [DateTime] … …I’d like to construct an Ad-hoc report where if the contents of EventName on one row was ‘EventStart’ and another was ‘EventEnd’ then calculate the difference between the associated EventDateTime columns. Is this possible?Sorry, Left off the fact that this report needs to be created in Report Builder 1.0 and I don't have control of the actual 'Select' statement.Thanks again for your help. |
|
JCirocco
Constraint Violating Yak Guru
392 Posts |
Posted - 2009-10-05 : 08:34:32
|
How about in your SQL, can you SELECT the StartDate as another field that repeats every roll in addition to the current selection of dates? You do not have to output every field you select but this way you can reference the field in your report on any row. Just a thought.John |
|
|
rohitkumar
Constraint Violating Yak Guru
472 Posts |
Posted - 2009-10-05 : 16:29:52
|
you can always add a calculated column in your dataset |
|
|
|
|
|