Hello All,
I'm trying to run the query Below on SQL Server 2000 and and getting the error "Line 4: Incorrect syntax near '=' " I wonder if anyone can offer assistance?
Many Thanks
Graham
I'm trying to run the query Below on SQL Server 2000 and and getting the error "Line 4: Incorrect syntax near '=' " I wonder if anyone can offer assistance?
Code:
UPDATE tblStaffQual
SET Status =
(CASE
WHEN GETDATE() >= Expires_Date THEN Status = 'Expired'
WHEN GETDATE() < (Expires_Date-90) THEN Status = 'Current'
ELSE (Status = 'Approaching')
END
);
Many Thanks
Graham
Last edited: