使用 oracle SQL 开发人员,
我有两个具有不同列的视图。如何将第 1 列从视图 A 连接到视图 B?我想AR_INVOICE_INQ_V.CLI_NAME CLI_NAME
从视图 B 加入视图 A。
查看 A
CREATE OR REPLACE FORCE VIEW "KPRD"."AC_INPUT_AUDIT" ("CLIENT", "SEQUENCE_CODE", "EMPLOYEE", "ORIGINAL_DATE", "HOURS_SPENT", "LONG_DESCRIPTION", "TIME_AT_ACTUAL", "MANAGER")
AS
SELECT CLIENT,
SEQUENCE_CODE,
EMPLOYEE,
ORIGINAL_DATE,
HOURS_SPENT,
LONG_DESCRIPTION,
TIME_AT_ACTUAL,
MANAGER
FROM TIME_DETAILS
WHERE MANAGER BETWEEN 'AAGG' AND 'AZJE'
AND ORIGINAL_DATE > '28/SEP/2012'
AND TIME_AT_ACTUAL ! = 0;
视图 B
CREATE OR REPLACE FORCE VIEW "KPRD"."AC_AR_INV_BAL" ("CLIENT", "CLI_NAME", "PARTNER", "PAR_NAME", "MANAGER", "REFERENCE", "STATUS_CODE", "INVOICE_DATE", "TIME_BILLED", "GROUP_CLIENT_CODE", "GRPCLI_NAME", "INVOICE_BALANCE")
AS
SELECT AR_INVOICE_INQ_V.CLIENT CLIENT,
AR_INVOICE_INQ_V.CLI_NAME CLI_NAME,
AR_INVOICE_INQ_V.PARTNER PARTNER,
AR_INVOICE_INQ_V.PAR_NAME PAR_NAME,
AR_INVOICE_INQ_V.MANAGER MANAGER,
AR_INVOICE_INQ_V.REFERENCE REFERENCE,
AR_INVOICE_INQ_V.STATUS_CODE STATUS_CODE,
AR_INVOICE_INQ_V.INVOICE_DATE INVOICE_DATE,
AR_INVOICE_INQ_V.TIME_BILLED TIME_BILLED,
AR_INVOICE_INQ_V.GROUP_CLIENT_CODE GROUP_CLIENT_CODE,
AR_INVOICE_INQ_V.GRPCLI_NAME GRPCLI_NAME,
AR_INVOICE_INQ_V.INVOICE_BALANCE
FROM AR_INVOICE_INQ_V
WHERE MANAGER BETWEEN 'AAGG' AND 'AZGG';