Union of two like databases

For HanDBase related topics that are not specific to one platform.

Union of two like databases

Postby rculhane@darden.com » Thu Aug 16, 2012 11:39 am

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
rculhane@darden.com
 
Posts: 1
Joined: Thu Aug 16, 2012 11:34 am

Return to HanDBase General Discussion

Who is online

Users browsing this forum: No registered users and 0 guests