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



In general, SQL doesn't guarantee the order of rows unless you explicitly specify that order. Add an ORDER BY clause to your SELECT and all will be well.

Joe

Has anyone run into this problem before?
Through ODBC I have set up an Excel to import into a worksheet the
records from two separate tables with the same record layout. Here is
the code:
SELECT * FROM LIBRARYA.FILE123 FILE123 UNION ALL
SELECT * FROM LIBRARYB.FILE123 FILE123
Normally it pulls in the records the way we expect it to with the
records from LIBRARYA appearing before the records for LIBRARYB. Every
few weeks the order is mysteriously reversed, where LIBRARYB appears
before LIBRARYA. The records for each file are still in the correct
order, just the file order is reversed. At first I thought this had
something to do with Excel, but when I run the same code on our i system
I get the same results.
Any enlightenment as to why this is happening would be greatly
appreciated. A solution would cause me to do handstands.


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