SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2012 Forums
 Transact-SQL (2012)
 Insert a new record when value does not exist
 New Topic  Reply to Topic
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 2

gbritton
Aged Yak Warrior

787 Posts

Posted - 08/27/2014 :  20:06:15  Show Profile  Reply with Quote
So, the data is never sent to (or pulled from) the target server? I thought that was what you needed in the first place. I thought your requirement was to update both servers so that the data was in sync

Edited by - gbritton on 08/27/2014 20:08:14
Go to Top of Page

sql_server_dba
Posting Yak Master

160 Posts

Posted - 08/28/2014 :  12:22:09  Show Profile  Reply with Quote
Update happens only at Target..not the source. Once we write this query on Source, we can move the data into Target and load it directly by comparing it to Primary Key....no need of doing a special compare to any of the values on target!!!

Edited by - sql_server_dba on 08/28/2014 12:23:35
Go to Top of Page

gbritton
Aged Yak Warrior

787 Posts

Posted - 08/28/2014 :  12:26:36  Show Profile  Reply with Quote
So...how do you get the data to the Target?
Go to Top of Page

sql_server_dba
Posting Yak Master

160 Posts

Posted - 08/28/2014 :  12:31:23  Show Profile  Reply with Quote
SELECT returns the result set and pushes the data using SSIS..just the data. SSIS does not compare any values..
Go to Top of Page

gbritton
Aged Yak Warrior

787 Posts

Posted - 08/28/2014 :  15:08:54  Show Profile  Reply with Quote
Aha! So, you are using SSIS, even though you don't want to! Well, I'm not surprised. You needed something to bridge the two servers. SSIS is one good way to do that.
Go to Top of Page

sql_server_dba
Posting Yak Master

160 Posts

Posted - 08/28/2014 :  16:20:49  Show Profile  Reply with Quote
Yeah, but only to move the data..no comparision of data in it.
Go to Top of Page

gbritton
Aged Yak Warrior

787 Posts

Posted - 08/29/2014 :  07:51:22  Show Profile  Reply with Quote
Understood. Pity though. SSIS does this much easier than TSQL. Also makes it easy to implement auditing and error checking.
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Previous Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000