Home Forums SQL Server 2008 SQL Server Newbies Records for last 2 hours RE: Records for last 2 hours
djj
SSCoach
Points: 18831
More actions
March 26, 2014 at 10:04 am
#1700375
You can combine the two thus
SELECT CAST(CurrentDate AS DATETIME) + CAST(Time AS DATETIME) FROM Data
This will be a DATETIME value. So you might use a CTE to combine the values then do the compare