DTS Import from Excel

  • Somebody else may have a better / different way of doing this but, I usually use a transform task or a bulk insert task to put the file contents into a temp table and then execute straight T-SQL to do my updates and inserts. Pretty plain but effective.

    David

    David

    @SQLTentmaker

    “He is no fool who gives what he cannot keep to gain that which he cannot lose” - Jim Elliot

  • I agree with David - even though you can treat Excel as an OLEDB data source doesn't mean you should! Not much extra work to get into a temp table.

    Andy

  • actually i had 2 remote db,both db has the table has almost identical attributes. i thought of doing a ,erge replication but my manager do not wish to meddle around with the proxy/firewall. i doubt this 2 db are on tbe same network cos one of which is in the production site and the other is for intranet.

    thus, i thought of doing a DTS package, to export the table records from production db to excel and then some transformation/validation to import from the intranet db.

    do u guys have better way out than this? really appreciate ur input on this..thanks

  • I do this on a regular basis and import into a staging table. Then I have a sproc that updates changed records (by matching PKs) and deletes them from the staging table. Then the sproc imports the remaining rows.

    I use the DTS package to import the rows and run the sproc.

    Steve Jones

    steve@dkranch.net

Viewing 4 posts - 1 through 5 (of 5 total)

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