alan_lynch (3/7/2013)
Hi Lynnjust me again I forgot to mention that yes I want to insert data that does not already exist in the Target Table but if it does exist then I want to update the source table value with col2 value
Target
col1,col2
a,'test1'
b,'test2'
c,'test3'
Source
col1
a,
b,
c,
d
inserted expected results in target
a,'test1' -------------------------------------Matched 'a' so update Source with Targets second column value
b,'test2' -------------------------------------Matched 'b' so update Source with Targets second column value
c,'test3' -------------------------------------Matched 'c' so update Source with Targets second column value
d,'needs updating' -----------------------------Was NO so Match got inserted
expected results in Source
'test1'
'test2'
'test3'
SO you if there is match in Target, change the Source. If there is no match in Target, add source to target. This right??