dbTalk Databases Forums  

Exception reports

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Exception reports in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jackie Smith
 
Posts: n/a

Default Exception reports - 10-25-2010 , 10:39 AM






Hi there,
I'm not sure whether a job or a script is best to do this.
There will be an import of data into one of the databases I support. New
records in this import should be appended to an existing table in my
database. New records added should be sent as an email to certain
recipients.

Also existing records will need to be updated if there are changes in the
imported file. Any changes should be sent via email to recipients again
showing the state of the record before the update and after the update.

Any pointers as what's best to use/ the steps to take.

For new records...
I'm thinking along the lines of create a job to import the records into a
temporary table.
2nd step is to write a query (left-join) that will insert the new
recordsinto another table
If there are new records (how do I check if recordcount > 0??) then fire
email

For changed records...
Use the temporary table above
Join on key fields.
Where there are differences in other fields, export the record to a new
table (how do I get the existing data and the changed data exported one
after the other??)
If there are changed records then fire email

TIA

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.