Hi,
In your first query (for Oracle) you're using TO_DATE() function to convert the date data type RECEIVEDATE to DATE. For MSSQL you're not doing the same. Try using a respective function for TO_DATE(), e.g. CONVERT(date,'yyyymmdd hh:mm:ss').
Regards,
IgorMi
Igor Micev,My blog: www.igormicev.com