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



Repeat after me....

"Without an ORDER BY clause in my SQL statement, nothing can be known
(or assumed) about the order in which records will be returned."

If the order matters, you have to have an ORDER BY.

HTH,
Charles


On Fri, Apr 3, 2009 at 5:01 PM, Zangare, Basil (GE Comm Fin, non-ge)
<basil.zangare@xxxxxxxxxxx> wrote:
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.


TIA,

Basil Zangare
GEMSA Loan Services, L.P. www.gemsals.com <http://www.gemsals.com/>
1500 City West Blvd.
Suite 200
Houston, Texas 77042
Phone: 713.458.7218
Email: basil.zangare@xxxxxxxxxxx

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

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.