ddq that uses update and insert

  • hi,

    i am trying to create a dts that uses ddq to upload an excel file into an sql table.  i want the ddq to do an update if the source data is existing in the destination table.  i want to do an insert if its not existing.

    i created a lookup that queries the table with code equal to the source data that i am trying to upload but i keep getting an error.

    can anyone post a sample activex script (that works) that handles an update/insert task please.  would really appreciate it.  getting a bit tired browsing the net =(

    regards.

    ann

     

  • Hi Ann, I would do this slightly differently.

    Create a new SQL Server table - 'import', or whatever - and import all of your Excel data into that.

    Then have your DTS package execute a stored procedure that performs INSERTs/UPDATEs from the import table to your main table.  You could build in error reporting here too (trapping dodgy data).

    Final stage of your DTS package is to do something with the import table - DELETE/TRUNCATE/set 'imported' flag to 'Y' etc.  Then you're ready for the next import.

    Regards.

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

  • hi phil,

    why did i didnt think of that.  that's a good idea.  i'll create one that uses that logic. i

    although, 'm still interested to hear some idea on how to implement the lookups/ddq/insert/update logic in dts.

    ann

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply