On 19 Feb 2013 14:07, Stone, Joel wrote:
Issue: I am CREATEing a table with a union and SQL errors out
because the ALIAS field names are not identical between the two
union input files. But the 10-byte names are identical.

Presumably the issue is SQL0153 "Column list required." The issue is easily resolved without naming the columns. Just use the first subselect for the CREATE TABLE AS, but using the WITH NO DATA clause. Then use the same query as what would have been the CREATE TABLE AS of the UNION query on an INSERT INTO statement.

Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2015 by MIDRANGE dot 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 here. If you have questions about this, please contact