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



Something like this maybe:

With order_data as (
Select dord#, dordl#, dqty, dprice
From order_details
Union all
Select hord# as dord#, hordl# as dordl#, hqty as dqty, hprice as dprice
From order_history)

Select column-list
From order_data a
Join other-files
Where condition
Order by order-list;

-----Original Message-----
From: Hoteltravelfundotcom <hoteltravelfun@xxxxxxxxx>
Sender: "MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxx>Date: Tue, 21 Oct 2014 18:59:39
To: Midrange Systems Technical Discussion<midrange-l@xxxxxxxxxxxx>
Reply-To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Subject: Re: CPYF = UNION ?

i want to create a view that would do a union on 2 logical views.
basically, in our system, we have open orders in 2 places. in the details
file and in history. I need to report on all open orders. it was fine doing
the 'old' way
of 2 queries and then the CPYF.

I changed the queries to views. now i want to add them together.

On Tue, Oct 21, 2014 at 6:55 PM, Vernon Hamberg <vhamberg@xxxxxxxxxxxxxxx>
wrote:

I really need more information - I'll take a stab at something, however.

CPYF is a command, UNION is an SQL keyword.

There is nothing about UNION that makes things any more dynamic, so far as
I can see.

But I don't know where you are getting the data.

Besides, look at the MBROPT parameter of CPYF.



On 10/21/2014 5:38 PM, 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 legnths
and
# of fields are the same, we get the add perfectly.


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