Automated import

  • Hello all,

    Not sure if i have picked the right forum, please move if i have not.

    I am receiving on a daily basis a CSV file which I want to then import into a database table which I have set up based upon the CSV file. I am doing this through the DTS package with SQL's Enterprise Manager.

    In addition i have added a Column to the DB table which basically makes each record a "Y" or "N" which allows me to control whether or not the record should be displayed on the site. However as I am simply deleting the old table data and populating it with the new import on a daily basis i have no way to maintain the "Y" or "N" status. This is important as the new CSV files that comes in may only have a few records changed from the last and the rest stay the same. Is there a way on an import to check if A. the record exists and B. What the Status is (either Y or N) and maintains its status on each import?

    I could update it manually each day but i want to make this as automated as possible.

    Thanks for listening.

    TheFish.

  • You could either store the previous version of the table in a different table on the database and then update the Y/N flag on your new version.

    Or you could import to a different table and only insert new records and update existing records on your existing table.

     

    Hope this gives you some help.

     

    S

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

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