I have two tables:
TableA
column0 int identity,
Key1 varchar(50),
Key2 varchar(50),
Column3 varchar(50)
TableB
Key1 varchar(50),
Key2 varchar(50),
Column3 varchar(50)
Now I have to insert/update into TableB
from TableA
depending on the Key1
and Key2
columns. Also not all records in TableA
can be considered. Only the records with the MAX identity(column0) value when grouped by key1,key2
need to be considered.