|
Upgrade to v4r3. That's when the scalar & row subselect support was added to UPDATE. But you might need to create a temporary result, using some kind of join, then copy that to the original. Or set it up with a QMQRY, then STRQMQRY with output to the original file. It'll replace it in place -- definitely DANGER WILL ROBINSON time here. Basically it'd be a JOIN where that column always comes from the APAR file. At 11:20 AM 3/21/02 -0600, you wrote: >Hi All, >I ma trying to run the following SQL statement, UPDATE NCTSF/"RNK.CPRP" SET >CP_PRIMARY_TAXPAYER = >P_PRIMARY_TAXPAYER WHERE CP_PRIMARY_TAXPAYER <> P_PRIMARY_TAXPAYER > >P_PRIMARY_TAXPAYER is from file NCTSF/"RNK.APAR". >I have not been able to figure out the syntax to get this statement to work. >The OS is V4R2. > >Does anyone know how I can get this to look at the second file for the where >clause and for it to use that value then to do the update. > >TIA >Ron >_______________________________________________ >This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list >To post a message email: MIDRANGE-L@midrange.com >To subscribe, unsubscribe, or change list options, >visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l >or email: MIDRANGE-L-request@midrange.com >Before posting, please take a moment to review the archives >at http://archive.midrange.com/midrange-l.
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.