|
This is a multi-part message in MIME format. -- [ Picked text/plain from multipart/alternative ] Ok...I've figured it out! But first. Matt Tyler responded with: Run the following command RTVQMQRY QMQRY(TULTBQRY03) SRCFILE(YOURLIB/YOURSRC) ALWQRYDFN(*YES) Thank you, Matt Tyler Mattt@wincofoods.com Thanks for you response Matt. That's how I generated my original SQL statement. Unfortunately, RTVQMQRY doesn't handle exceptions joins. The result of the RTVQMQRY was: H QM4 05 Q 01 E V W E R 01 03 02/10/12 13:48 V 1001 050 V 5001 004 *HEX SELECT ALL T01.PEEMLN, T01.PEEMFN, T01.PEEMA1, T01.PEEMA2, T01.PEECTY, T01.PEESTA, T01.PEEZIP, T01.PEEZP2 FROM NETFIL/PEMASTP T01, P400NEW/TB001PF T02 WHERE T01.PECONO = T02.TOCONO AND T01.PEEMNO = T02.TOEMNO AND( PECONO = 160 AND PELVL2 IN (160, 162) AND PELVL1 = 75000 AND PEJCLS = 5000 AND PESTAT = 'A') ORDER BY T01.PEEMLN ASC, T01.PEEMFN ASC However after further review of my SQL statement,(Why do I always figure these things out AFTER I ask for help?) I added a select clause which seems to work. Here's my modified statement: INSERT INTO P400NEW.TB003PF (TEEMLN, TEEMFN, TEEMA1, TEEMA2, TEECTY, TEESTA, TEEZIP, TEEZP2) SELECT PEEMLN, PEEMFN, PEEMA1, PEEMA2, PEECTY, PEESTA, PEEZIP, PEEZP2 FROM NETFIL.PEMASTP EXCEPTION JOIN P400NEW.TB001PF ON PECONO = TOCONO AND PEEMNO = TOEMNO WHERE (PECONO = 160 AND PELVL2 IN (160, 162) AND PELVL1 = 75000 AND PEJCLS = 5000 AND PESTAT = 'A') ORDER BY PEEMLN ASC, PEEMFN ASC Thanks again for you help! Karl Keller Information Systems Girling Health Care, Inc. Confidentiality Notice: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. --
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.