Import excel data into already existing database table

  • Hello,

    I am trying to import two excel data columns into an already existing database table. I am using SQL 2000. I am trying to add two columns of data to my already existing production database table from an excel spreadsheet.  I can import the data into its own table within the database but not within the already existing table. Any Suggestions?

  • You are correct - Using DTS, you cannot update table rows based on rows in an excel spreadsheet.

    Instead, use DTS to import the Excel spreadsheet into a table, and then have a DTS SQL Tasks that update the other table from the Excel table.

    SQL = Scarcely Qualifies as a Language

  • How do I go about that? I can get the data into a separate table.

  • if you are trying to append the data from excel to 2 existing colums in your table you can do that with DTS, use the build query function of the Transform Data task to select the two columns you need. 

    If you are trying to update data then import the data into a seperate table and use an sql task to execute an update statement joining the 2 tables.

    If you are trying to add the excel data to 2 new columns in the table then you have to add the columns via table designer and then use the update statement indicated above.


  • I've got it figured out, but thanks for the reply. I simply imported the data into a separate table and then used tsql update clause to update the new columns.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply