Results 1 to 7 of 7

Thread: multiple tables

  1. #1
    Join Date
    Feb 2004
    Posts
    15

    Unanswered: 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

    Thanks

  2. #2
    Join Date
    May 2002
    Location
    Timbaktu
    Posts
    185

    DTS is the solution

    Create 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.

  3. #3
    Join Date
    Feb 2004
    Posts
    15
    Hi

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

    Thanks

  4. #4
    Join Date
    May 2002
    Location
    Timbaktu
    Posts
    185
    Yes you have to set the Transform data task.

  5. #5
    Join Date
    Feb 2004
    Posts
    15
    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

  6. #6
    Join Date
    May 2002
    Location
    Timbaktu
    Posts
    185
    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/

  7. #7
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    Also refer to http://www.sqldts.com for code examples on ActiveX & DTS goodies.
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •