|
I am trying to use the following embedded sql code joining two files via
a left outer join. When I rmeove the highlighted code, I get the
results I am expecting, however, with the code inserted it doesn't
return any records, which tell sme there is probably some sort of syntax
issue. When I run the sql statement in SQL400 it is fine, and when I
run it through a third party SQL it runs fine. Please help.
fWOP05U if e k disk
FWOP05UL1 IF E K DISK
F RENAME(WOR05U:WOR05UA)
C/EXEC SQL
C+ DECLARE C1 CURSOR FOR
C+ SELECT
C+ CONO15,PLNO15,WONO15,MQTY15,MOVC15,ACCN15,TRND15,
C+ MOVT15,PNVM15,PDES15,PERN15,
C+ CONO05,PLNO05,TAXC05
C+ FROM WOP15U A
C+ LEFT OUTER JOIN
C+ WOP05U B ON
C+ A.CONO15 = B.CONO05 AND A.PLNO15 = B.PLNO05
C+ WHERE A.CONO15 = '01' AND
C+ A.MOVT15 = 'I' AND
C+ PERN15>= :FRPRD AND PERN15<= :TOPRD
C/END-EXEC
C/EXEC SQL
C+ FETCH NEXT FROM C1 INTO
C+ :CONO15,:PLNO15,:WONO15,:MQTY15,:MOVC15,:ACCN15,:TRND15,
C+ :MOVT15,:PNVM15,:PDES15,:PERN15,
C+ :CONO05,:PLNO05,:TAXC05
C/END-EXEC
**********************************************************************
This message, together with any attachments, may include proprietary and confidential information of Ormet and is intended only for the person or persons to whom it is addressed. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, use, or any action or reliance on this communication is strictly prohibited. This document is not intended to operate as an electronic signature and is not intended to form a binding contract unless it so expressly states. If you have received this e-mail in error, please notify the sender immediately by return e-mail and delete the message, along with any attachments.
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.