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



> I have two files in relation master&details.

> SPMAST (master file)  has records, SPRENK (detail file) has no record
empty
> file.

> via STRSQL I can get all the records from first file when I use LEFT
JOIN.

> but via RPG code (same SQL statement) I can't get any record.


Acar,
I wonder what type of join a LEFT JOIN is.  Is it a LEFT OUTER JOIN, or an
INNER JOIN?  Anway, either way you're in for trouble if there are no
records in the second file.  With INNER JOIN you'll get no records because
there is no match.  With a LEFT OUTER JOIN you could have problems in the
RPG because it doesn't handle NULL values very well, but in your case
you're not selecting any fields from the second file so I don't expect that
is the problem.  I would try specifying what type of join you're really
trying to do and see if that helps.  Its possible that if you are at
different OS levels that one version assumes a different kind of join than
the other.

Darren Strong
Programmer




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.