I'm trying to use some variables in a TSQL query and I know I'm screwing it up.<BR><BR>However, is there a way to see the TSQL AFTER the "compiler" SQL Server Management Studio's query places the ...
I have a SELECT statement, it is calculating the same DateDiff about 5 times. I'm using some CASE WHEN stuff and the result of DateDiff in days is how I determine what part of the case it goes with.