Update few data | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Update few data

I would like to do the following: select * from [OneServer].[BBDD].[dbo].[Tabla] where field not in (select field from
[OtherServer].[BBDD].[dbo].[Tabla]) The idea is get only new few rows. Any Help?
Luis Martin …Thus mathematics may be defined as the subject in which we never know what we are talking about, nor whether what we are saying is true.
Bertrand Russell
Use Linked server with openquery. _________
Satya SKJ
Moderator
SQL-Server-Performance.Com

Satya I’m new in DTS querys, would you explain me a litter more? Thanks, Luis Martin …Thus mathematics may be defined as the subject in which we never know what we are talking about, nor whether what we are saying is true.
Bertrand Russell
I think he means you should do something along these lines: — On OneServer
EXEC sp_addlinkedserver ‘OtherServer’, N’SQL Server’ SELECT *
FROM [BBDD].[dbo].[Tabla]
WHERE field NOT IN (SELECT field
FROM OPENQUERY(OtherServer, ‘SELECT field FROM [BBDD].[dbo].[Tabla]’))
Thanks Negative I’ll try. Luis Martin …Thus mathematics may be defined as the subject in which we never know what we are talking about, nor whether what we are saying is true.
Bertrand Russell
Thanks Negative…. and as always refer to books online for such information.
In your case Linked Server will help not DTS, i think. _________
Satya SKJ
Moderator
SQL-Server-Performance.Com

I fell the same, I can’t find a way to do that with DTS. A schedule job will help.<br /><br /><br />BTW: I undertand now why this post was move from DTS to General, never was a DTS problem[<img src=’/community/emoticons/emotion-2.gif’ alt=’:D‘ />]<br /><br />Luis Martin<br /><br />…Thus mathematics may be defined as the subject in which we never know what we are talking about, nor whether what we are saying is true. <br />Bertrand Russell
]]>