Monday, March 12, 2012

multiple tables

Hi

I am trying to import an excel spreadsheet into a sql server database. The problem is I need the information in the spreadsheet to be imported into 3 different tables. I thought of transfering all details into a temporary table and then setting 3 triggers for each transfer of information. But this seems very inefficient. I know there should be an easier way to do this in dts.

Any help would be greatly appreciated

ThanksCreate a DTS package with Excel spreadSheet as the Source and the SQL Server as the Destination.
Create 3 Destination SQL Server and Define a connection between the one Excel Source and the three SQL Server destination table. It should just work perfect for you.|||Hi

Thanks for your reply...is that a connection using the transform data task??

Thanks|||Yes you have to set the Transform data task.|||Hi

Is this just using a for loop in the activeX script and incrementing each time...I have been trying to do this, but it keeps returning an error.

Thanks|||In the DTS tool bar there is a tool called Transofm task. Just select the source(excel) and Destination(sql server) and run it. You don't need to code any ActiveX script unless you plan to do some data messaging during the import/|||Also refer to http://www.sqldts.com for code examples on ActiveX & DTS goodies.

No comments:

Post a Comment