Check Source Data exists

  • Hi. I have a DTS that imports data once a day from approx 12 tables. The proces is to Truncate all the Destination tables then import fresh data from Source. This works 95% of the time but if there is a problem with the sourec ie. no data then my DTS executes anyway and I am left with no data.

    How can I check to see if the source has data and then only if there is data execute package.

  • several options here:

    the Best is to use STAGING TABLES

    you could also change the TRUNCATE to DELETE and wrap all in one transaction. at the end if no rows are avail do a rollback but that thoes not looks good to me.

    Last and not least check the source with a query and if no rows then exit the package

     


    * Noel

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

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