Using IIF in SQL update statement – Returns [S0001][207] Invalid column name
I am using IIF in an Update query to set a column in SQL Server table, however I am getting an error "Invalid column name ‘Y’" Here is the query, I want to update a column called PREVIOUS_STATUS to ‘Y’ only if another column DATE_CREATED is not null UPDATE [dbo].[ACCOUNT] SET STATUS = 'ACTIVE' PREVIOUS_STATUS