nedd help with conversion from SQL to TERA.
(datediff(day,convert(datetime,convert(char(8),LastCommunication)),getdate()) >=3 )
and(datediff(day,FTD_Date,getdate()) between 12 and 20 )
It's similar to your previous questions, calculating the difference in days between to Dates/Timestamps:
-- Assuming LastCommunication is a Timestamp and the Converts strip of the time portion? datediff(day,convert(datetime,convert(char(8),LastCommunication)),getdate()) = CURRENT_DATE - CAST(LastCommunication AS DATE) datediff(day,FTD_Date,getdate()) = CURRENT_DATE - FTD_Date
This is similar to your previous questions, you should be able to solve this on your own by now :-)