I have a date of birth field that was imported with a few errors and I’m trying to correct them. I’m using the query
UPDATE myTable
SET DOB=2012-04-10
WHERE id=123456
And I am getting the error
Msg 206, Level 16, Line 1
Operand type clash: int is incompatible with date
This seems logical enough to me, but not to SQL Server, any idea on how to fix this?
You need to put an apostrophe around the date: