dbTalk Databases Forums  

update one column in a table with data from an excel file or table

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


Discuss update one column in a table with data from an excel file or table in the microsoft.public.sqlserver.dts forum.



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

Default update one column in a table with data from an excel file or table - 10-21-2006 , 09:52 PM






I need to update one column in a table that already has data in it.
I need to update one field in each record with the data from an Excel file
The file has the key and field data that need to be inserted
Can some one post an example of this type of update statement, I could import
the data to a new table if that would be easier. Thanks in Advance!



Reply With Quote
  #2  
Old   
Warren Brunk
 
Posts: n/a

Default Re: update one column in a table with data from an excel file or table - 10-23-2006 , 04:37 PM






The answer is that its really up to you.
Depending on your level of knowledge of DTS and VB scripting will give you
your answer.
If you dont know DTS and VB Scripting well, you could always load the data
into a Load Table and write a cursor to update the data.
If you want to get into using variables and doing everything inside of the
DTS SQL Tasks you could use this example that I have used in the past...
http://www.aspfree.com/c/a/MS-SQL-Se...TS-Designer/3/

thanks,

--
/*
Warren Brunk - MCITP - SQL 2005, MCDBA
www.techintsolutions.com
Tech Blog - www.technologyis.com
*/


"data_day_and_nite" <datadayandnite (AT) discussions (DOT) microsoft.com> wrote in
message newsD36A9D7-BFFF-489D-99F7-94BC481B2603 (AT) microsoft (DOT) com...
Quote:
I need to update one column in a table that already has data in it.
I need to update one field in each record with the data from an Excel file
The file has the key and field data that need to be inserted
Can some one post an example of this type of update statement, I could
import
the data to a new table if that would be easier. 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.