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 Development (2000)
 DTS with lookups to replicate

Author  Topic 

rifkhan
Starting Member

1 Post

Posted - 2003-07-08 : 03:24:17
i'm tring to replicate a table from AS400/DB2 to SQL using DTS

To do this in the DTS Transformation Data i have a quiry like this

SELECT * FROM OSLD1F3.INP20 WHERE
OSLD1F3 .CONO20= 'GD' and OSLD1F3.STRC20 NOT IN
(SELECT sdi.dbo.STRC20 FROM sdi.dbo.INP20 )

purpose of this query is to select all new recods from AS400/DB2 which not in the SQL DB

what i found is we can use 1 st SQL for connection that is AS400/DB2

and second SQL is for the connection 2 SQL DB

but i can't access both connection @ once can i replace the the second part with a lookup ??

SELECT sdi.dbo.STRC20 FROM sdi.dbo.INP20

and write somthing like this ??

SELECT * FROM OSLD1F3.INP20 WHERE
OSLD1F3 .CONO20= 'GD' and OSLD1F3.STRC20 NOT IN
(record set coming through the lookup )

?? any other good way to write a replication script between two Database platforms ???





Stoad
Freaky Yak Linguist

1983 Posts

Posted - 2003-07-08 : 05:19:25
Why not just add DB2 as linked server to SQL Server?

- Vit
Go to Top of Page
   

- Advertisement -