Results 1 to 3 of 3

Thread: Importing A Text File Using The DTS Wizard

  1. #1
    Join Date
    Mar 2004
    Location
    Buenos Aires - Argentina
    Posts
    2

    Angry Importing A Text File Using The DTS Wizard

    Hi people! I have to import several text files to a certain table in MS SQLSErver 2000. I decided to create a DTS Package. I have a text file (source), a connection and a transformation task. I just selected wich "columns" from file belong to wich columns in table and i executed it. The problem is I have some records repeated in file and it affects the primary key in table. How could i know that record had already been "copied"? I know how to skip an insert (ActiveX Scripting) bnut i dont know how to find the repeated records in file.

    Sorry my english and thanks in advance!

  2. #2
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    You can use Lookup query from activex script transformation to check whether the row exists, quit or continue based on the result.

    See "Configuring a Simple Lookup Query" in books online.

  3. #3
    Join Date
    Mar 2004
    Location
    Buenos Aires - Argentina
    Posts
    2
    I used a Lookup query wich checks if that record exists already. It always returns the record doesnt exist but that because it finds the destination table empty.
    I unchecked the package property about using transactions but it still doesnt work.
    i dont know what to do!

Posting Permissions

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