|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Friday, May 10, 2013 10:24 AM
Points: 9,
Visits: 218
|
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Tuesday, May 07, 2013 7:34 AM
Points: 1,
Visits: 16
|
|
| What about using of tablediff utility?
|
|
|
|
|
Right there with Babe
      
Group: General Forum Members
Last Login: Thursday, February 14, 2013 12:01 PM
Points: 743,
Visits: 900
|
|
I think this procedure is impressively well done.
With that said, It does seem to be a bit of a solution looking for a problem. Writing the merge statement directly is not at all challenging and it seems easier to simply do that then learn the nuances of this procedure, especially since writing it directly permits it to be made more nuanced if so desired.
--- Timothy A Wiseman SQL Blog: http://timothyawiseman.wordpress.com/
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Thursday, May 16, 2013 12:43 PM
Points: 1,148,
Visits: 3,148
|
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Sunday, May 10, 2009 9:29 PM
Points: 29,
Visits: 6
|
|
Thank you so much for posting this!
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Tuesday, April 09, 2013 7:02 AM
Points: 1,
Visits: 2
|
|
Excellent work. Never mind the comment about this being a solution looking for a problem, this proc was exactly what I needed. We have lots of different reference data tables what I want to keep "relatively" in sync and this gives me 99% of what I need. The other 1% I can tweak the proc to make happen.
One thing, in your example 2, merging from a linked server, I believe you need to change the @srcType value sent in to 'LINK' from 'SQL'. That's what I needed to do in order to pull from the linked server. It wouldn't work otherwise.
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Friday, May 10, 2013 10:24 AM
Points: 9,
Visits: 218
|
|
Thank you very much for your kind feedback. Your comments are correct regarding the "link". The actual usage for this was originally to an AS400 linked server.
As so often happens when you provide a tool which makes coding easier, I've now had to re-train folks so that they don't over-use the MERGE statement:)
|
|
|
|