August 10, 2010 at 11:40 pm
hi,
i am trying to compare data in four or more columns between two tables .
if both the tables contain the same data than data must remain the same,
if data in the A table is not there , but is present in the B table then it must insert the new record from the B table into the A table .
if data is present in the A table but not in the B table then the data is assumed as resolved and should be shifted to the resolved claims table .
i have tried using mege statement for this ,
but i am getting many records and duplicates too..
i have corssed the deadline ....i need some help
thanx in advance
August 10, 2010 at 11:55 pm
If you just need to add records to A, try something along the lines of
INSERT A
SELECT B.*
FROM B
LEFT OUTER JOIN A
WHERE A.notnull_column IS NULL
August 11, 2010 at 12:04 am
hi thanx for ur help ,
but this is not solving my problem
i want to perform an action on the two tables exactly how the merge statement would do ,
but the only problem i am facing with merge is that it is duplicating records..
is there any way to avoid duplication ...or then any other way to perform the action.
thanx in advance
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply