|
Hmmm... interesting problem. I'm not aware of a way to do this with just SQL; however, maybe the SQL could reference a UDF() that checked files open in the job? I've never checked such job & file info while an SQL function was active. The UDF() could be written in any available language. Just a thought. Tom Liotta midrange-l-request@xxxxxxxxxxxx wrote: > 9. RE: SQL Triggers and Multiple Member Database Files > (Wilt, Charles) > >As far as I know, it can't be done with an SQL trigger. > >Which would make sense since SQL doesn't have any concept of multiple members. > >You have two options: >1) Change the program to use a temporary work file. >2) Use an RPG/COBOL/C program for your trigger. > > >> -----Original Message----- >> From: midrange-l-bounces@xxxxxxxxxxxx >> [mailto:midrange-l-bounces@xxxxxxxxxxxx]On Behalf Of Reinardy, James >> >> We are using SQL Triggers on an 830 running v5r2 in connection with an >> application that is writing transactions to an audit file for later >> updates to a data warehouse. We are finding that one source >> of a lot of >> transactions is a program that creates and then deletes a temporary >> member in one of our major database files. These transactions are >> useless to us, and are causing some issues because the key values are >> the same as the primary member, and the audit records show up >> as another >> insert of the same keys. I am looking for a way to reference >> the member >> name in the SQL trigger to exclude updates to the secondary >> member from >> being written to our transaction audit files. Any ideas >> about how to do >> this? -- Tom Liotta The PowerTech Group, Inc. 19426 68th Avenue South Kent, WA 98032 Phone 253-872-7788 x313 Fax 253-872-7904 http://www.powertech.com __________________________________________________________________ Switch to Netscape Internet Service. As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register Netscape. Just the Net You Need. New! Netscape Toolbar for Internet Explorer Search from anywhere on the Web and block those annoying pop-ups. Download now at http://channels.netscape.com/ns/search/install.jsp
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.