Alternatively you can create an SQL view to query data from multiple tables and simplify the process. Run the script below to create a SQL view.
CREATE VIEW "TPCH"."ORDERS_ALL_VIEW" AS
SELECT * FROM "TPCH"."ORDERS_CS"
UNION ALL
SELECT * FROM "TPCH"."ORDERS_DT";
Verify the script executed correctly.
After successfully creating a view, you can query against the "TPCH"."ORDERS_ALL_VIEW"
whenever you need to access the combined data set. For example, if you want to query order records that are between 6 months and 18 months old, you can execute the query below.
SELECT "TPCH"."ORDERS_ALL_VIEW".* FROM "TPCH"."ORDERS_ALL_VIEW"
WHERE "TPCH"."ORDERS_ALL_VIEW" ."O_ORDERDATE"
BETWEEN ADD_YEARS(CURRENT_DATE, -1.5)
AND ADD_YEARS(CURRENT_DATE, -0.5)