I am trying to extract data from two tables. I am trying to use a union to join the two tables so I can retrieve the information I need. Here is what I have so far but I get an error saying missing select statement. I am not sure if the rest of my code is correct. Any help is appreciated as I am completely new to Oracle. We have Oracle 9i.
CREATE VIEW "LABOR"."LT_VIEW_RPT_VENDOR_CHRGBK" AS
SELECT
LABOR.LT_SHIFT_CONFIG.LT_SH_CFG_MECH_PAY_HRS as"MECH_HRS",
LABOR.LT_SHIFT_CONFIG.LT_SH_CFG_OP_PAY_HRS as"OPER_HRS",
LABOR.LT_SHIFT_CONFIG.LT_SH_CFG_SHIFT as "SHIFT",
LABOR.LT_SHIFT_CONFIG.LT_SH_CFG_SHIFT_DT as "SHIFT_DATE",
LABOR.LT_SHIFT_CONFIG.LT_SH_CFG_SHIFT_ID as "SHIFT_ID",
LABOR.LT_SHIFT_CONFIG.LT_SH_CFG_UP as "UP"
UNION
SELECT
LABOR.LT_SHIFT_UNPR_NOT_CHRG.LT_SH_NCHG_HRS as "UNPROD_HRS",
LABOR.LT_SHIFT_UNPR_NOT_CHRG.LT_SH_NCHG_SHIFT_ID as "SHIFT_ID",
LABOR.LT_SHIFT_UNPR_NOT_CHRG.LT_SH_NCHG_UNPROD_CD as "UNPROD_HRS_CODE",
LABOR.LT_SHIFT_UNPR_NOT_CHRG.LT_SH_NCHG_UP as "UP"
WHERE
LABOR.LT_SHIFT_CONFIG.LT_SH_CFG_SHIFT_DT as "SHIFT_DATE" > '30-Jun-2006' and
LABOR.LT_SHIFT_UNPR_NOT_CHRG.LT_SH_NCHG_UNPROD_CD = '14'