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



Hi Donna

Others have said to use RTVQMQRY - that is the way to go. Just know that the only join type that works IS 1 - matched records - when you run that command, be sure to look into the job log for warning messages about things that might not have converted. There is also an ANZQMQRY that just gives you the warnings.

There is a manual - Query Management Programmer's Guide I think - that has a chapter on what all these warnings could be - that's the only place to find it.

QMQRY and QMFORM are the SQLish replacements for Query/400 and have tremendous advantages, in my opinion. QMQRY is the data retrieval part, QMFORM is the presentation part - Query/400 combines them in one object. You should take a look at STRQM and play around - there is also a manual - Query Manager User's Guide or something.

Now QM stands for Query Management, not Query Manager - the latter is an interactive front-end to query management on the iSeries.

Enjoy!
Vern

-------------- Original message ----------------------
From: donna lester <donna_lester_ny@xxxxxxxxx>
I have a query between two files FILE1, FILE2

type of join : 1 Matched records.
how to join : T01.SBKRNM EQ T02.SRCDTA
SELECT RECORDS: T01.SQCDE LIST 'SA' 'SB' 'SD' 'SG' 'SH'

the count of records is 465,962

I have written equivalent SQL(I dont think its correct bcoz count is
differing) as I need SQL conversion of above query.

SELECT COUNT(*) FROM FILE1 A JOIN
FILE2 B ON A.SBKRNM = B.SRCDTA
AND A.SQCDE IN('SA', 'SB', 'SD', 'SG', 'SH')

Count comes 299,428

I tried right outer join as below but count count doesnt match.
SELECT COUNT(*) FROM FILE1 A RIGHT OUTER JOIN
FILE23 B ON A.SBKRNM = B.SRCDTA
AND A.SQCDE IN('SA', 'SB', 'SD', 'SG', 'SH')

Can some one advise what could be the correct SQL equivalent of my query.
Sorry for my ignorance of the understanding with unions if it is something wrong
with my SQL.


Thanks,

Donna.

---------------------------------
Catch up on fall's hot new shows on Yahoo! TV. Watch previews, get listings,
and more!
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



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.