dbTalk Databases Forums  

Task

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Task in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
anonymous
 
Posts: n/a

Default Task - 02-19-2004 , 02:31 PM






I have 2 connection (conn1 and conn2) to the different
sources.
I need to do the following logic:
1. Select data from conn1 based on pk
2.Compare the data to the data in conn2 based on pl
3.If data exists in conn2 update conn1 based on pk
Please help me with the task I should use in order to do
this.

Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Task - 02-20-2004 , 12:50 AM






Different Servers?

No:

A simple UPDATE Statement will do the job

Yes:

You have a number of options

1. Pump the data from your connection 2 over to the connection 1. Use TSQL
to do the UPDATE statement
2. Use Lookups.

How to Use Lookups in DTS
(http://www.sqldts.com/default.aspx?277)

3. Use Linked Servers.

Hope this helps,

--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.allisonmitchell.com - Expert SQL Server Consultancy.
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"anonymous" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
I have 2 connection (conn1 and conn2) to the different
sources.
I need to do the following logic:
1. Select data from conn1 based on pk
2.Compare the data to the data in conn2 based on pl
3.If data exists in conn2 update conn1 based on pk
Please help me with the task I should use in order to do
this.



Reply With Quote
  #3  
Old   
anonymous
 
Posts: n/a

Default Re: Task - 02-20-2004 , 07:59 AM



I can't do a simple UPDATE, because one of the connection
to AS400.
I've started to do a DDQ, however it is asking me to have
at least one query.
1. In a DDQ I created a lookup query and based on the
results of the query I am updating first conn1 (update
query is exists in lookups).
Any idea what should I do in order to fix this issue?

Thanks


Reply With Quote
  #4  
Old   
anonymous
 
Posts: n/a

Default Re: Task - 02-20-2004 , 07:59 AM



I can't do a simple UPDATE, because one of the connection
to AS400.
I've started to do a DDQ, however it is asking me to have
at least one query.
1. In a DDQ I created a lookup query and based on the
results of the query I am updating first conn1 (update
query is exists in lookups).
Any idea what should I do in order to fix this issue?

Thanks


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.