|
quoteUnfortunately the developer has looked into the problem you are seeing, and has determined it is the result of a bug that was fixed in V5R4. The results of the column names you were seeing prior to V5R4 was incorrect, and is now working in V5R4 as it is documented.
If the nth column of R1 and the nth column of R2 have the same result column name, then the nth column of the result table has the result column name. If the nth column of R1 and the nth column of R2 do not have the same names, then the result column is unnamed.
!quoteThe second paragraph above is in the v5r3 as well as v5r4 sql reference pdf (Chap 4, fullselect, rules for columns).
I'd be interested to see what other database systems return. I wonder if that is sql engine implementation requirements or i/db2 interpretation. No matter I guess. Be forewarned that one must use "AS COLNAME" whenever the col names will be different in any unions.
Thanks group for the assistance. BruceJ
As an Amazon Associate we earn from qualifying purchases.
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 copyright@midrange.com.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.