dbTalk Databases Forums  

Query Statement in Import Wizard

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


Discuss Query Statement in Import Wizard in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
The Gekkster via SQLMonster.com
 
Posts: n/a

Default Query Statement in Import Wizard - 05-11-2005 , 10:58 AM






I'm working on a DTS Package that will need to be scheduled to pull data
from a table on remote server, which I know can mostly be done via wizard.
My question concerns the query statement used to select data within the
wizard.

The basic remote table (tblDealer) structure is this:

DealerID [PK] int, DealerName varchar(100), StreetAddress varchar(250),
City varchar(100), State int, ZipCode char(10), etc.

The destination table is of the same name and structure. What I want to
accomplish is this:

If a DealerID on the remote server is found to exist on the destination
server, then update that DealerID with the matching entries from the remote
server; otherwise, add the new DealerID and it's entries. In other words,
something along the lines of IF EXISTS UPDATE, ELSE INSERT INTO.

Could anyone offer a coding example, or a suggestion for a better way to do
this. I was thinking that this would be the 'cleanest' under the given
circumstances, but you guys may see a much better solution.

Ideally, this remote server will be taken out of the loop. But for now I'm
stuck with this process until a few 'data review' issues can be resolved.
For similar reasons I can't just copy the remote table.

Any help is appreciated. Thanks.

--
Message posted via http://www.sqlmonster.com

Reply With Quote
  #2  
Old   
The Gekkster via SQLMonster.com
 
Posts: n/a

Default Re: Query Statement in Import Wizard - 05-12-2005 , 10:58 AM






Please disregard. Thanks.

--
Message posted via http://www.sqlmonster.com

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.