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


  • Subject: RE: Problems with Query on V4R5
  • From: Buck Calabro <Buck.Calabro@xxxxxxxxxxxx>
  • Date: Fri, 15 Jun 2001 15:22:34 -0400

>I always thought that the default ordering was 
>by RRN if no other order was specified.

This is a common misconception.  The manuals only go back to V3R1, but as
far as I know, it has always been true that "When running a query that does
not have a sort field specified, | the order in which rows are retrieved is
not guaranteed. If the order is important, you should define a sort field in
the query. A thorough knowledge of database concepts, including file type
and access paths, is needed if you want to predict the sequence of your
output."
Query/400 use V3R1, 2.6.1, Letting Query determine the order of records for
you:
http://publib.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/QBKAGG00/2.6.1

Further down, it also says "Note: When you select a logical file for use
with Query or SQL/400 programs without specifying any sort fields,
unpredictable results may occur. For example, you may not receive the
logical view of the physical file."
And quite explicitly "If you did not type a 1 next to the Select sort fields
option on the Define the Query display, the Select Sort Fields display is
not shown while you work with your query definition, and the data is not
sorted when you run the query."
Buck Calabro
Commsoft; Albany, NY
Visit the Midrange archives and FAQ at http://www.midrange.com
"...the humourous man shall end his part in peace..."
  -- Hamlet Act II, scene ii
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

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.