Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Importing selected data from Excel to overwrite ..

Author  Topic 

collieraff
Starting Member

1 Post

Posted - 2007-05-18 : 05:30:51
.. columns in SQL.

Hi

Here's my situation. I have an existing db with a number of tables. One of the tables, tblITEMS, contains numerous part numbers and descriptions. I also have an Excel files that has updated DESCRIPTIONS and I want to import these updated descriptions into tblITEMS. Basically I want to be able to say that where the PART_NO in the Excel file and tlITEMS are the same, to import the DESCRIPTION from the Excel file and update the DESCRIPTION in tblITEMS.

Thanks in advance

Colin

ashley.sql
Constraint Violating Yak Guru

299 Posts

Posted - 2007-05-18 : 17:13:47
you can do this with a select query. this link will be helpful to come up with that query

http://www.oreillynet.com/pub/a/network/2002/04/08/compsets.html

Ashley Rhodes
Go to Top of Page

sshelper
Posting Yak Master

216 Posts

Posted - 2007-05-18 : 17:31:31
You can read the contents of your Excel file using OPENROWSET. Here are a few links that discusses this function:

http://www.sql-server-helper.com/tips/read-import-excel-file-p01.aspx
http://www.sql-server-helper.com/tips/read-import-excel-file-p02.aspx
http://www.sql-server-helper.com/tips/read-import-excel-file-p03.aspx

SQL Server Helper
http://www.sql-server-helper.com
Go to Top of Page
   

- Advertisement -