Avatar of HKFuey
HKFuey
Flag for United Kingdom of Great Britain and Northern Ireland

asked on 

SQL Reserved word issue

I want to use this formula for a date range: 
> DATEADD(year,-1,GETDATE())

Open in new window

There is a field in the table so SQL converts the formula to:
> DATEADD(MyTableName.year,-1,GETDATE())

Open in new window

Anyone know how to get round this?
SQLMicrosoft SQL Server

Avatar of undefined
Last Comment
HKFuey

8/22/2022 - Mon