Having trouble locating a "Missing Keyword" error in the sql below that I am using within Sql Developer to extract data from an Oracle database.
What is the problem and resolution?
Thanks in advance.
Meanwhile, I will continue to troubleshoot.
alter session set nls_date_format = 'MM/DD/YY';
SELECT CLCL_ID,
CDML_SEQ_NO,
CLCL.PRPR_ID AS SVC_PRPR_ID,
CLCL.CLCL_PAYEE_PR_ID AS PAY_TO_PRPR_ID,
CLCL.CLCL_PRPR_ID_PCP AS PCP_PRPR_ID,
PRPR.PRPR_NAME,
MEME_CK,
(CASE
WHEN CLCL.GRGR_CK = 4 THEN
CASE
WHEN MEPE.CSCS_ID = 'KD03' THEN 'KAH'
WHEN MEPE.CSCS_ID = 'CD03' THEN 'CAIS'
WHEN MEPE.CSCS_ID = 'PL03' THEN 'PLAF'
END
CASE
WHEN CLCL.GRGR_CK = 8 THEN
CASE
WHEN MEPE.CSCS_ID = 'TR04' THEN 'THGR'
END
ELSE 'XX'
END) AS PRODUCT,
SBSB_ID,
GRGR_CK,
CSCS_ID,
CDML_FROM_DT,
CDML_TO_DT,
CDML_CONSIDER_CHG,
CDML_PR_PYMT_AMT,
CDML_SB_PYMT_AMT,
CLCL.CLCL_PAID_DT,
FROM CMC_CLCL_CLAIM CLCL
INNER JOIN CMC_PRPR_PROV PRPR
ON CLCL.PRPR_ID = PRPR.PRPR_ID
AND CLCL.GRGR_CK = 8
AND CLCL.CSCS_ID = 'TR04'
AND CLCL.CLCL_PAID_DT BETWEEN '04/06/09' AND '04/12/09'
INNER JOIN CMC_CDML_CL_LINE CDML
ON CLCL.CLCL_ID = CDML.CLCL_ID
INNER JOIN CMC_SBSB_SUBSC SBSB
ON CLCL.SBSB_CK = SBSB.SBSB_CK
INNER JOIN CMC_EXCD_EXPL_CD EXCD
ON CDML.CDML_DISALL_EXCD = EXCD.EXCD_ID
LEFT JOIN CMC_CLHP_HOSP CLHP
ON CLCL.CLCL_ID = CLHP.CLCL_ID
What is the problem and resolution?
Thanks in advance.
Meanwhile, I will continue to troubleshoot.
alter session set nls_date_format = 'MM/DD/YY';
SELECT CLCL_ID,
CDML_SEQ_NO,
CLCL.PRPR_ID AS SVC_PRPR_ID,
CLCL.CLCL_PAYEE_PR_ID AS PAY_TO_PRPR_ID,
CLCL.CLCL_PRPR_ID_PCP AS PCP_PRPR_ID,
PRPR.PRPR_NAME,
MEME_CK,
(CASE
WHEN CLCL.GRGR_CK = 4 THEN
CASE
WHEN MEPE.CSCS_ID = 'KD03' THEN 'KAH'
WHEN MEPE.CSCS_ID = 'CD03' THEN 'CAIS'
WHEN MEPE.CSCS_ID = 'PL03' THEN 'PLAF'
END
CASE
WHEN CLCL.GRGR_CK = 8 THEN
CASE
WHEN MEPE.CSCS_ID = 'TR04' THEN 'THGR'
END
ELSE 'XX'
END) AS PRODUCT,
SBSB_ID,
GRGR_CK,
CSCS_ID,
CDML_FROM_DT,
CDML_TO_DT,
CDML_CONSIDER_CHG,
CDML_PR_PYMT_AMT,
CDML_SB_PYMT_AMT,
CLCL.CLCL_PAID_DT,
FROM CMC_CLCL_CLAIM CLCL
INNER JOIN CMC_PRPR_PROV PRPR
ON CLCL.PRPR_ID = PRPR.PRPR_ID
AND CLCL.GRGR_CK = 8
AND CLCL.CSCS_ID = 'TR04'
AND CLCL.CLCL_PAID_DT BETWEEN '04/06/09' AND '04/12/09'
INNER JOIN CMC_CDML_CL_LINE CDML
ON CLCL.CLCL_ID = CDML.CLCL_ID
INNER JOIN CMC_SBSB_SUBSC SBSB
ON CLCL.SBSB_CK = SBSB.SBSB_CK
INNER JOIN CMC_EXCD_EXPL_CD EXCD
ON CDML.CDML_DISALL_EXCD = EXCD.EXCD_ID
LEFT JOIN CMC_CLHP_HOSP CLHP
ON CLCL.CLCL_ID = CLHP.CLCL_ID