Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2003
    Posts
    15

    Unanswered: DTS import CSV record to multiple tables

    Hi,

    I am using DTS in SQL server2k

    What is the best way to insert CSV records, where 1 record maps onto multiple tables with parent/child or PK/FK relationship.

    eg.
    CSV record
    (ID, param1, param2, param3)

    ParentTable(ID as PK)
    Param1Table(ID as FK in ParentTable, param1)
    Param2Table(ID as FK in ParentTable, param2)
    Param3Table(ID as FK in ParentTable, param3)

    Currently i am using multiple Transform Data tasks with ActiveX script. But it seems to work slow.

    Thanks and regards,
    Henry

  2. #2
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    I think I would use a staging table, then use a sproc to slice and dice...
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

Posting Permissions

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