July 18, 2018 at 12:04 am
Hi All,
We have a requirement where we need to compare table rows and merge the rows. Based on my research on internet found below options.
Need some advise regarding which ones is a better option and what are the drawbacks of other remaining options. Would like to know pros and cons in terms of additional overhead, simplicity/maintainability, performance etc...
1. Merge statement
2. CDC
3. create a custom change log table
4. checksum
5. hash bytes
Thanks,
Sam
July 18, 2018 at 1:09 am
there are many ways to achieve what you are asking as you can see from your research, before anyone could help we would require some more information around the process.
can you provide the full process, what exactly are you wanting to achieve, how often you will be looking to do the compare, what are you comparing against, why is this needed etc
***The first step is always the hardest *******
July 18, 2018 at 12:19 pm
Use MS's free tool "tablediff.exe" and let them do this work for you, and fully tested already! Unfortunately quirky to get working initially, but works well after that, and it's free.
SQL DBA,SQL Server MVP(07, 08, 09) A socialist is someone who will give you the shirt off *someone else's* back.
July 18, 2018 at 1:20 pm
vsamantha35 - Wednesday, July 18, 2018 12:04 AMHi All,We have a requirement where we need to compare table rows and merge the rows. Based on my research on internet found below options.
Need some advise regarding which ones is a better option and what are the drawbacks of other remaining options. Would like to know pros and cons in terms of additional overhead, simplicity/maintainability, performance etc...1. Merge statement
2. CDC
3. create a custom change log table
4. checksum
5. hash bytesThanks,
Sam
What do items 2 and 3 have to do with merging data?
Also, if you're trying to do whole row comparisons, you could also use EXCEPT, which would could be used to create a dataset of differences.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply