I would like to check if my data has changed since the last update and if so, another field to 'N/A'. So I have forename, surname and married status. If a person's married status has changed. I would like to set married status to 'Yes' otherwise do not update it.
Something like this?....
INSERT INTO TARGET
CASE WHEN TARGET.SURNAME <> SOURCE.SURNAME THEN 'YES' ELSE TARGET.MARRIED_STATUS