Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update records with MSSQL DTS...

Status
Not open for further replies.

fdgsogc

Vendor
Feb 26, 2004
160
CA
I am a newbie to databases and MSSQL. I have successfully added records to my tables in MSSQL by using the DTS Import/Export wizard.

I am having great difficulty in updating records. I wanted to use the DTS Import/Export wizard but it's not built to handle updates. I have successfully used the SQL Query Analyzer but it takes me forever to build the queries using queries within quieries. Here's an example of an update query I built.
Code:
update products
set products.option1 = (select option1 from product_category_temp
where  product_category_temp.product_ID = products.product_ID)
My scenario is as follows. I have records already in a database. I then have updates that need to be applied to these records. I need a simpler method of applying a text file to existing records. Any ideas.
 
If you have access to the DTS designer, try using the Data Driven Query task. It allows you to import data and then specify INSERTS, UPDATES, DELETES or any other user function you want to perform on the data.

Refer to "Data Driven Query task" in Books online (BOL).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top