Hi Michael

Not sure why use something other than RTVQMQRY - it puts the SELECT statement directly into a source member. It works with either  QMQRY or a QRYDFN - maybe that's what you are using?

Just a thought.

*Regards*

*Vern Hamberg*

IBM Champion 2025 <cid:part1.N4R4QLD0.mVXNsRAG@centurylink.net> CAAC (COMMON Americas Advisory Council) IBM Influencer 2023

On 7/16/2025 11:34 AM, Michael Mayer via MIDRANGE-L wrote:
I have an SQL that I can send along that will convert any QRY or QMQRY to SQL in a source member file.

It can be found on my IBM i Reference Pages Blog @https://ibmireference.blogspot.com/
Go to the More Helpful Tips Page:
https://ibmireference.blogspot.com/p/ibm-i-more-helpful-tips.html
Instructions provided.
MM



Respectfully,
Michael Mayer
IBM i on Power System Admin
ERMCO-ECI
2225 Industrial Rd
Dyersburg, Tennessee 38024
Cell, Office and Text Messages: 518.641.8906
Email:michael.mayer@xxxxxxxxxxxxx
https://www.ermco-eci.com https://ermcopower.com/
IBM i Award Winning Blog Site:https://ibmireference.blogspot.com
Awarded IBM 2024/2025 Advocate, Contributor, Influencer and IBM i Ready Badges.




1. Query/400 converted to SQL (Bill and Lisa Howie)


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

message: 1
date: Wed, 16 Jul 2025 13:59:56 +0000
from: Bill and Lisa Howie<blhowie66@xxxxxxxxxxx>
subject: Query/400 converted to SQL

Hello all,

I have a question. I'm trying to convert a Query/400 query into an SQL statement. Would I be right in thinking that option 3 for the type of join in Query/400 (Unmatched records with the primary file) would correspond to a LEFT join in SQL? I ask because I've written an SQL query that I think should correspond to the Query/400 query I'm working with and the data results aren't matching. Thanks in advance for any info.

Bill


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


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