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



If you do I think you want a cross join.

http://www-01.ibm.com/support/knowledgecenter/ssw_i5_54/sqlp/rbafycrojo.htm


On Wed, Oct 22, 2014 at 3:43 PM, Hoteltravelfundotcom <
hoteltravelfun@xxxxxxxxx> wrote:

so really i should do a join logical it seems.

On Wed, Oct 22, 2014 at 4:53 PM, Hoteltravelfundotcom <
hoteltravelfun@xxxxxxxxx> wrote:

i see. i'll have to try and see.

On Wed, Oct 22, 2014 at 12:29 PM, CRPence <CRPbottle@xxxxxxxxx> wrote:

On 21-Oct-2014 17:38 -0500, Hoteltravelfundotcom wrote:

I have gotten the data as I need using CPYF.

Now to make this dynamic, I want to use UNION

Will this be the same as CPYF that is, if all fields are the same
lengths and # of fields are the same, we get the add perfectly.


The SQL is much more sophisticated, plus the column names are
immaterial for the UNION query; the column names from the /primary/ file
are used for the result set if they are not specified explicitly. The
allowed /mapping/ and the defined /promotion/ of data types for the SQL
determines if the query is allowed [without explicit casting or other
derivations\expressions] and if so, then also what is the final data
type
of each column.

Presuming [based on a prior topic that was posted about] there are two
files with identical column definitions but different column names [e.g.
name prefix betwixt, being the only differences], the UNION query is
quite
simple:

select * from first_file
union all
select * from second_file

The CREATE VIEW is a tad more particular with regard to naming the
columns, so a column-list would be required:

create view union_view
( "1stField" for f1
, "2ndField" for f2
, "NthField" for fn
) as
select * from first_file
union all
select * from second_file

--
Regards, Chuck

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



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