MERGE UserT AS target
USING SUP/TLupdatedListQuery AS source ON target.Username = source.SUP/TLupdatedListQuery
AND target.Password = source.PERSON T-ID
WHEN NOT MATCHED BY TARGET THEN
INSERT (Field1, PERSON T-ID) VALUES (source.Field1, source.PERSON T-ID)
WHEN NOT MATCHED BY SOURCE THEN
DELETE;
I am using this query and it's not working
What I am trying to do is merge 2 tables
I have Table 1 which has old records of employees their names and ID number
and as employee change in the company so new list comes Table 2 is created I ran a query to pull employee name and ID to merge in table 1
so some employee record remain same however some change so i need to delete few in old table and add new ones