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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Checking Oracle to SQL Server

Author  Topic 

CSK
Constraint Violating Yak Guru

489 Posts

Posted - 2006-11-27 : 01:13:25
Dear All,

I have two database servers

1 SQL server
2.Oracle Server

I have connected the Orcle Server in SQl Server.
Now I need to do the following

I want to compare the data in sql server table from Oracle server table. If Not Exists I want to insert the records otherwise will leave it. I want to schedule the things daily

How can i do this..?

Can any one able to help me..? PLease.

Thanks and regards
Krishnakumar.C

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-11-27 : 01:23:41
Just the same way as you do internal in SQL Server

insert into orac.mytable
select ms.col1, ms.col2
from mssql.mytable ms
left join orac.mytable as om on.colpk = ms.colpk
where orac.colpk is null


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

CSK
Constraint Violating Yak Guru

489 Posts

Posted - 2006-11-27 : 01:27:56
Thnaks for your Suggession Peter I will Let u Know
Thanks and regards
Krishna
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-11-27 : 07:36:15
Using linked server copy data to sql server then do comparison and insertion

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -