I can't seem to figure out how to add a variable that uses a table for its value.I'd like to use SELECT DATEADD(HH, -1,MAX(LastModifiedDate)) FROM TicketsTableAs my variable.Currently I use something like DATEADD(DAY, -2,MAX(GETDATE())Seems like it should be super simple...but I'm just not getting it.More details on the task. I pull data from a ticketing database into a reporting database. I pull this data nightly. My variable pulls system time - 2 days. If I can pull the Last Modified Date from the Reporting database tickets tables it would reduce the resource cost dramatically and allow me to run it dynamically instead of every night.Thank you,
↧