curiouswebster
asked on
T-SQL: problem comparing datetime
I want to include records from the last one year but have trouble casting the date...
WHERE Cast(sfl.[DateOfException] as date) > DATEDIFF(year, -1, GETDATE())
What is wrong with this syntax?
I get "Operand type clash: date is incompatible with int"
Thankls
WHERE Cast(sfl.[DateOfException]
What is wrong with this syntax?
I get "Operand type clash: date is incompatible with int"
Thankls
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER