× 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'm trying to join to a master file two times in the same record (once for the sale rep's name; one for the tech's name). The application will be embedded SQL in an ILE RPG program.

I can solve the problem by creating a logical with renamed fields :( but I'm sure I've seen a way that doesn't require a external solution.

This way (below) works but SQL tells me my subquery has an unqualified correlation. I don't know if that means the Programming Police will be after me or if it's an indication of a potential performance problem. I could write a stored procedure but I think that's overkill.

select account,name,
(select sales    from master where empno=sales#),
(select service from master where empno=service#) from orders

thanks---

_________________________________________________________________
MSN Messenger with backgrounds, emoticons and more. http://www.msnmessenger-download.com/tracking/cdp_customize



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.