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 Excel Data into SQL from a package

Author  Topic 

edb2003
Yak Posting Veteran

66 Posts

Posted - 2004-10-05 : 17:38:41
Greetings SQLTeam,
I am new to DTS. I cannot use the wizard to import Excel Data into a SQL Table. However, I did create a package in DTS. Now where do I go from here? I have already created the Table to insert the data. I just dont know how to incorporate the package to run the process. DBA's say it's easy with DTS.

I appreciate everyones input.

Thx,
Ed

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-10-05 : 17:51:14
So you created a package...what is inside the package? Do you have a source and destination object in there with a transformation between them to move the data?

www.sqldts.com is a great resource for DTS stuff.

Tara
Go to Top of Page

edb2003
Yak Posting Veteran

66 Posts

Posted - 2004-10-05 : 17:54:18
I created a Microsoft Excel Connection to an Excel file I want to import and then I created a Microsoft OLE DB Provider for SQL Server to point to the database I desire the data.

I have quite a few options to bind these two together but have never done this before.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-10-05 : 18:00:18
Ok, you are on the right track. Now you must add a transformation task between those two objects. In the Task menu, you'll find Transform Data Task... Click that. Now click on the source object, which is the Excel object. Now click on the destination object, which is the SQ Server object. You now have defined a transformation between the two. Now you'll need to tell the transformation task which table to import the Excel data into. So double click the transformation (the arrow between the two objects). Once in the Transformation Data Task Properties, go to the Destination tab. Select your table in the Table Name drop down list. Click the transformation tab. In this tab, you will define the mapping between the columns your Excel spreadsheet and the columns in the table. Once you are done, click OK. You now should be able to execute this package.

BTW, it may be easier for you to use the DTS wizard to initially create your package. During the wizard, you can save it as a DTS package. You can then modify this package to your liking. I realize you mentioned that you can't use this, but I assume this is because you need a saved package so that it can be run over and over again. This is still true through the wizard as you can save it.

Tara
Go to Top of Page

edb2003
Yak Posting Veteran

66 Posts

Posted - 2004-10-05 : 18:07:47
Wow :) my first DTS and it works fine. Thank you so much for introducing me to this. Looks like there is a lot that can be done with packages. I will investigate this further from here at SQLTeam and DTSsql.

Thank you,
Edb
Go to Top of Page
   

- Advertisement -