About
Pricing
Community
Teams
Start Free Trial
Log in
curiouswebster
asked on
4/26/2017
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
Microsoft SQL Server
Microsoft SQL Server 2008
* T-SQL
SQL
4
3
Last Comment
curiouswebster
8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Nakul Vachhrajani
4/26/2017
THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
Jim Horn
4/26/2017
THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
Kyle Abrahams, PMP
4/26/2017
THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
curiouswebster
4/26/2017
ASKER
thanks
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck