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



Hello all,



Since changing the i and upgrading from V7.1 to V7.3, it has been
discovered that at at least 2 SQL statements are no longer working in the
same way.

Could it be that there was some kind of system parameter concerning the
usage of SQL that was missed ?



In the example below, no order by clause was added as it was assumed that
the lines resulting from the part of the statement preceding « UNION »
would appear in the final table before those in the latter part of the
statement.

Ie, line B followed by line L.

If the statement is issued in an interactive sql session then this is the
case. However, the statement is being used in a cursor in a sqlrpgle
program, and since changing the i, the result is line L followed by line B.



Thanks in advance for any input.



Data in physical file

Type Code

B ****

L ****





SELECT distinct type, Code FROM MyTable

WHERE 1=1

AND type = 'B'

UNION

SELECT distinct type, Code FROM MyTable

WHERE 1=1

AND type IN ( 'L', 'M')

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.