× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



>The statement above would only be fired if a record were updated AND
the
>record contents changed...

I'll go one better, look at using SQL to create the trigger. You can
specify what FIELD(s) to watch for a change. 

----Code----

Create trigger OSChange after update of status on GWRQCTP
referencing new as NowIs
for each row mode db2sql

/* I like to be able to see compiled trigger code */
set option output=*print

/* SQL will bail at this point is the new status value <> 'OS' */
When (NowIs.Status = 'OS')

BEGIN

/* Declare field(s) needed to hold data you want to pass to your pgm */
Declare KeyField int;

/* Load up the field(s) with data from changed row. */
Set KeyField = NowIs.KeyField;

/* Call program to do something. Or use SQL statements here if you can.
*/
/* I'd love to use CALL YourPgm(NowIs.KeyField), but SQL won't allow it.
*/
CALL YourPgm(KeyField);

END


----End Code----


------------
Walden H Leverich III
President & CEO
Tech Software
(516) 627-3800 x11
WaldenL@xxxxxxxxxxxxxxx
http://www.TechSoftInc.com 

Quiquid latine dictum sit altum viditur.
(Whatever is said in Latin seems profound.)


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.