Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Jeynesy
Starting Member
2 Posts |
Posted - 2015-01-02 : 18:37:02
|
Hi - I am have linked servers and I am trying to do a basic synchronisation between a local SQL 2005 express and a remote SQL 2005 Server using an - IF NOT EXISTS INSERT INTO Statement. Something like...If Not Exists(SELECT * FROM [109.203.122.211,XXXXX].ShelfLifeTacker.dbo.tblProducts)Begininsert into [109.203.122.211,XXXXX].ShelfLifeTacker.dbo.tblProductsselect *from tblProductsEndI get 'Command(s) completed successfully' - but no data is inserted.Apologies if this is glaringly obvious. Thanks in advance for any advice |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2015-01-03 : 08:58:25
|
check if thisSELECT * FROM [109.203.122.211,XXXXX].ShelfLifeTacker.dbo.tblProductsgives any output Too old to Rock'n'Roll too young to die. |
|
|
|
|
|