If I were to do something like
select datediff(hour,myfieldtime,getdate()) as 'TimeDiff'
where 'TimeDiff' > 24
I would get an error
Syntax error converting the varchar value 'TimeDiff' to a column of data type int.
as it does not see TimeDiff as a field. How would I best express the above?
select datediff(hour,myfieldtime,getdate()) as 'TimeDiff'
where 'TimeDiff' > 24
I would get an error
Syntax error converting the varchar value 'TimeDiff' to a column of data type int.
as it does not see TimeDiff as a field. How would I best express the above?