August 19, 2016 at 11:04 am
Hello,
I need to develop a report using two databases, so I have 2 datasets. My problem is I have a primary key that is not truly unique, so I need to match the records with two criteria. My second problem is that the second criteria is a date/time. The date time field has a format of 00/00/000 00:00:00 where the centiseconds are not going to match. Is there a way I can cut off the centiseconds before the query starts? Or, is there a better way to do this? Also, I can not cut off the centiseconds in the database.
Here is an example of the data I am dealing with.
DataSet 1 DataSet 2
ID # Time ID# Time
15456 08/17/2016 01:05:39 15456 08/17/2016 01:05:42
15456 08/17/2016 01:14:01 15457 08/17/2016 03:12:09
15457 08/17/2016 03:12:01
In the example above I would need the first "15456" in both datasets to match up. In this example the 2nd "15456' in dataset 1 is junk. Some of the time it may be good, but in that case there would be a second "15456' in dataset 2.
Thank you for any help
August 21, 2016 at 4:28 pm
any chance you can post the two tables... the T-SQL to create and populate them? Then it would be a lot easier to follow...
Not sure but you may need to create a calculated column in each dataset and join them on that inside SSRS.
August 26, 2016 at 11:48 am
I'd dump both tables into temp tables, and cast your time fields as smalldatetime (which doesnt contain the centiseconds) while performing the dump. Join the temp tables.
August 26, 2016 at 11:56 am
Thank You I will try this
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply