Page 1 of 1

Union of two like databases

PostPosted: Thu Aug 16, 2012 11:39 am
by rculhane@darden.com
Can hanDBASE effect a Union of two different databases with exactly the same structure?
Using SQL I would use the Union for these two tables:

SQL> SELECT * FROM EAST_ORDERS;
ORD_DATE PROD_ID CUSTOMER QUANTITY
--------- ---------- --------------- ----------
08-APR-00 1101 BILL 10
04-APR-00 1102 SCOTT 210
01-APR-00 1101 SCOTT 30
08-APR-00 1103 LEEZA 41
08-APR-00 1103 MARY 50

SQL> SELECT * FROM WEST_ORDERS;
ORD_DATE PROD_ID CUSTOMER QUANTITY
--------- ---------- --------------- ----------
18-APR-00 1103 BILL 15
07-APR-00 1102 MARY 210
12-APR-00 1101 STEVE 30
18-APR-00 1103 SCOTT 50
SQL>

The UNION operator is used to return rows from either query. Let’s find
out the names of the company’s customers:
SQL> SELECT customer FROM east_orders
UNION
* SELECT customer FROM west_orders
SQL> /
CUSTOMER
---------------
BILL
LEEZA
MARY
SCOTT
STEVE
SQL>

Thanks,
Rob