UPDATE TT
SET DEATHDATE = NULL
FROM TEMP_TABLE TT
WHERE LTRIM(RTRIM(DEATHDATE)) = ''
UPDATE TT
SET CURRENTDATE= NULL
FROM TEMP_TABLE TT
WHERE LTRIM(RTRIM(CURRENTDATE)) = ''
UPDATE TT
SET BIRTHDATE = NULL
FROM TEMP_TABLE TT
WHERE LTRIM(RTRIM(BIRTHDATE)) = ''
OR
UPDATE TT
SET BIRTHDATE = NULL
FROM TEMP_TABLE TT
WHERE DATALENGTH(BIRTHDATE) = 0
This update statement will update to NULL if the specified column records are EMPTY.
But I don't like doing this. I want to change all of the records in the table. If there are EMPTY records in that table, I want to change them to NULL.
Is that even possible? Thank you in advance