× 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.



Which is the highlighted code?

From: "Shannon Wolf" <Shannon.Wolf@xxxxxxxxx>
To: <rpg400-l@xxxxxxxxxxxx>
Date: 07/22/2010 08:48 AM
Subject: Embedded SQL - Join problems
Sent by: rpg400-l-bounces@xxxxxxxxxxxx

--------------------------------------------------------------------------

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.
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: [1]http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at [2]http://archive.midrange.com/rpg400-l.

This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
Unless you are the addressee (or authorized to receive for the addressee),
you may not use, copy or disclose to anyone this email or any information
contained in this email. If you have received this email in error, please
advise the sender by replying to this email, and delete this email
immediately. Please note that any views or opinions presented in this
email are solely those of the author and do not necessarily represent
those of Western Dental Services, Inc. Finally, the recipient should check
this email and any attachments for the presence of viruses. Western Dental
Services, Inc. accepts no liability for any damage caused by any virus
transmitted by this email.

References

Visible links
1. http://lists.midrange.com/mailman/listinfo/rpg400-l
2. http://archive.midrange.com/rpg400-l

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.