Im trying to merger data together based upon a primary key that will be the same in two record sets.
I have the first record set with a primary key and 5 coloums of data and then I have a second record set with the primary key and 5 new colums. I want to be able to merge both record sets together so I can see one primary key and 10 coloums with any data that is not applicable just is left null.
Can anyone help please 🙂
http://msdn.microsoft.com/en-us/library/ms141029.aspx
Have you had a look at the how-to guide on MSDN? It’s a bit flakey with detail but it should help point you in the right direction.
The most annoying part is the data must be ‘sorted’ before being merged.
http://www.mssqltips.com/tip.asp?tip=1322
MSSQL tips has a much more comprehensive guide on how to get the Merge Join working. Just substitute their data-source for whatever you may be using.
Good luck, hope you get it working.