|
Archives of the TeradataForumMessage Posted: Tue, 23 Jun 2009 @ 07:24:30 GMT
There is no in built facility to do this, but assuming you really need to do it and the volumes are relatively low, you could do this with: a) a Trigger and an XSP or b) a Trigger, Queue table and an external program. In both case, the trigger fires when a row is inserted into your target table. In scenario a) The trigger calls the XSP. An XSP can do pretty much anything (within reason). Your XSP could call a mail API to generate the email(s). In scenario b) The trigger inserts data into the queue table. An external program is continually running a select and consume query on the queue table. If there are no rows in the queue table, the external program simply is blocked. When a row is present in the table, the select will return. The external program could then generate the email, again using a Mail API. I've used this approach for a couple of different purpose (not generating email) and it worked quite well. If memory serves Triggers calling XSP's is only a fairly recent addition to TD (maybe TD 12 or V2R6.2) so your ability to do this will be based upon the version of TD you are running. The Queue table approach should work with earlier version of Teradata (e.g. at least V2R6.1 and later). Obviously you would only want to do something like this where an insert into the table is a very exceptional circumstance otherwise people will be bombarded with emails about rows being loaded. Teradata Corporation
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | |||||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | |||||||||||||||||||||||||||||||||||||||||||||||||||