October 7, 2011 at 10:17 am
I have a situation where I'm processing records on one table (Table A) and based on the existance of each record on another table (Table B), I either need to update the row on Table B or insert the row into Table B. We have SQL Server 2008, but I shouldn't use merge because we have clients who aren't on 2008 yet. Can someone please tell me how best to perform this?
Thanks
October 7, 2011 at 10:31 am
Try read this:
http://technet.microsoft.com/en-us/library/bb510625.aspx
It gives an example of the code required to basically perform a merge without using the MERGE statement. It might assist you
October 7, 2011 at 10:41 am
I was struggling with knowing how to consecutively read Table A and update or insert it to Table B. The example they show without the merge, appears to me that it will do that. I will give it a try. Thanks so much!
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply