dbTalk Databases Forums  

Updating a table in SQL Server from an External Source using SSIS

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


Discuss Updating a table in SQL Server from an External Source using SSIS in the microsoft.public.sqlserver.dts forum.



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

Default Updating a table in SQL Server from an External Source using SSIS - 12-08-2005 , 05:03 AM






Hello,

I've got a questing regarding updating existing data in a SQL Server
table from an Excel file.

The situation (simplified):

Source:
Excel file containing (PK,value)

Target:
SQL Server table contating (PK,value ,DATETIME)

I would like to "merge" the excel, into the SQL Server table. If the
value is different than the SQL, update the SQL and change the datetime
to current date, and if it's the same, don't do anything.

I've tried several combinations using SSIS, but i can't find a way to
do this and avoid using a temporary staging table. Wasn't DTS all about
avoiding staging tables?
Another alternative i've found is to run a SQL Command for each row in
the excel, to launch a stored procedure on the server to perfrom an
"upsert" with this logic built in. The problem with this way, is that
the SQL Command is not considered a "destination" by SSIS, and i gives
warnings...

Is there a simple and "right" way to do this? I can't be the only one
who has encountered this issue... :-)

Thanks in advance!


Reply With Quote
  #2  
Old   
grandersg@gmail.com
 
Posts: n/a

Default Re: Updating a table in SQL Server from an External Source using SSIS - 12-08-2005 , 09:29 AM






We are also encountering a similar issue. Just as with DTS it seems
that SSIS is good with pulling bulk data. The problem we are running
into is how to run update commands to update information in a summary
table based on values returned by querying data in a SQL 2000 database.


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

Default Re: Updating a table in SQL Server from an External Source using SSIS - 12-12-2005 , 10:15 AM



No one answered, so i guess the best method is still using a staging
table...
This also yeilds the best performance too, from what i've observerd.

shlomoid wrote:
Quote:
Hello,

I've got a questing regarding updating existing data in a SQL Server
table from an Excel file.

The situation (simplified):

Source:
Excel file containing (PK,value)

Target:
SQL Server table contating (PK,value ,DATETIME)

I would like to "merge" the excel, into the SQL Server table. If the
value is different than the SQL, update the SQL and change the datetime
to current date, and if it's the same, don't do anything.

I've tried several combinations using SSIS, but i can't find a way to
do this and avoid using a temporary staging table. Wasn't DTS all about
avoiding staging tables?
Another alternative i've found is to run a SQL Command for each row in
the excel, to launch a stored procedure on the server to perfrom an
"upsert" with this logic built in. The problem with this way, is that
the SQL Command is not considered a "destination" by SSIS, and i gives
warnings...

Is there a simple and "right" way to do this? I can't be the only one
who has encountered this issue... :-)

Thanks in advance!


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.