I am updating Column2 with the year only from Column1. Since they both have DATE as data types, when I use the YEAR() or DATEPART() function they return an INT data type and therefore I get the error: Operand type clash: int is incompatible with dateSo I've tried converting it and I still get the same errorUPDATE [dbo].[TABLE]SET [COLUMN2] = CONVERT(INT,DATEPART(YEAR,[COLUMN1]))If anyone could point me in the right direction on how to fix this.Thanks.
↧