Have the following Oracle query that I would like to convert to a MS Access Passthrough query but continually receive a "ORA-00911: Invalid Character" error message.
Any idea as to what the problem/resolution is?
Greatly appreciate any insight as this is taking over a hour to resolve!
SELECT TAG_ID,
CDML_SEQ_NO,
TAG.PRPR_ID AS SVC_PRPR_ID,
TAG.TAG_PAYEE_PR_ID AS PAY_TO_PRPR_ID,
TAG.TAG_PRPR_ID_PCP AS PCP_PRPR_ID,
PRPR.PRPR_NAME,
MEME_CK,
(CASE
WHEN TAG.GRGR_CK = 4 THEN
CASE
WHEN TAG.CSCS_ID = 'LT04' THEN 'KIDS'
WHEN TAG.CSCS_ID = 'LB03' THEN 'CAID'
END
ELSE 'XX'
END) AS PRODUCT,
SBSB_ID AS MEMBER_ID,
TAG.GRGR_CK,
TAG.CSCS_ID,
CDML_FROM_DT,
CDML_TO_DT,
CDML_CONSIDER_CHG
CDML_PR_PYMT_AMT
CDML_SB_PYMT_AMT
TAG.TAG_PAID_DT,
(CASE
WHEN CO_STATUS = '01' THEN 'PRE-DISBURSED'
WHEN CO_STATUS = '02' THEN 'DISBURSED'
WHEN CO_STATUS IN ('42''43','45') THEN 'PEND'
WHEN CO_STATUS IN ('52','54','58') THEN 'ADJUSTED'
WHEN CO_STATUS IN ('26','28','29') THEN 'VOID'
WHEN CO_STATUS = '48' THEN 'ENCOUNTER'
ELSE '(*)'
END) AS INV_STATUS,
(CASE WHEN CO_STATUS IN ('26','28','29') THEN 'VOID'
WHEN CO_STATUS IN ('42','43','45') THEN 'IN PROCESS'
WHEN CDML_CONSIDER_CHG <> 0
AND CDML_DISALL_AMT = CDML_CONSIDER_CHG
AND CDML_PAID_AMT = 0 THEN 'DENIED'
ELSE 'PAID'
END) AS CLM_ADJ_RESULT,
CDML_DISALL_EXCD AS EXPLAIN_CD,
EXCD_SHORT_TEXT AS EXPLAIN_DESC,
(CASE WHEN CLHP.TAG_ID IS NULL THEN 'HCFA'
ELSE 'UB92' END) AS CLM_TYPE,
CLHP_FAC_TYPE || CLHP_BILL_CLASS || CLHP_FREQUENCY AS BILL_TYPE,
SUBSTR(CDML.IPCD_ID,3,8) AS PROC_CD,
SUBSTR(CDML.IPCD_ID,7,2) AS PROC_MOD1,
IDCD_ID AS DIAG_CD,
CDML.RCRC_ID AS REV_CD,
CLHP_INPUT_AGRG_ID AS SUBMIT_DRG_CD,
AGRG_ID AS FINAL_DRG_CD,
CLHP_COVD_DAYS AS DAYS_PAID,
CDML_UNITS AS UNITS_SUBMITTED,
CDML_UNITS_ALLOW AS UNITS_PAID
FROM CMC_TAG_CLAIM TAG
INNER JOIN CMT_PROT_PROV PRPR
ON TAG.PRPR_ID = PRPR.PRPR_ID
AND TAG.TRC_CK = 4
AND TAG.CSCS_ID = 'LB03'
AND TAG.TAG_PAID_DT BETWEEN '03/01/09' AND '04/12/09'
AND PRPR.PRPR_ID in ('142BRE356','142CE486','142DD345')
INNER JOIN CMC_CDML_CL_LINE CDML
ON TAG.TAG_ID = CDML.TAG_ID
INNER JOIN CMC_SBSB_SUBSC SBSB
ON TAG.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 TAG.TAG_ID = CLHP.TAG_ID;
Any idea as to what the problem/resolution is?
Greatly appreciate any insight as this is taking over a hour to resolve!
SELECT TAG_ID,
CDML_SEQ_NO,
TAG.PRPR_ID AS SVC_PRPR_ID,
TAG.TAG_PAYEE_PR_ID AS PAY_TO_PRPR_ID,
TAG.TAG_PRPR_ID_PCP AS PCP_PRPR_ID,
PRPR.PRPR_NAME,
MEME_CK,
(CASE
WHEN TAG.GRGR_CK = 4 THEN
CASE
WHEN TAG.CSCS_ID = 'LT04' THEN 'KIDS'
WHEN TAG.CSCS_ID = 'LB03' THEN 'CAID'
END
ELSE 'XX'
END) AS PRODUCT,
SBSB_ID AS MEMBER_ID,
TAG.GRGR_CK,
TAG.CSCS_ID,
CDML_FROM_DT,
CDML_TO_DT,
CDML_CONSIDER_CHG
CDML_PR_PYMT_AMT
CDML_SB_PYMT_AMT
TAG.TAG_PAID_DT,
(CASE
WHEN CO_STATUS = '01' THEN 'PRE-DISBURSED'
WHEN CO_STATUS = '02' THEN 'DISBURSED'
WHEN CO_STATUS IN ('42''43','45') THEN 'PEND'
WHEN CO_STATUS IN ('52','54','58') THEN 'ADJUSTED'
WHEN CO_STATUS IN ('26','28','29') THEN 'VOID'
WHEN CO_STATUS = '48' THEN 'ENCOUNTER'
ELSE '(*)'
END) AS INV_STATUS,
(CASE WHEN CO_STATUS IN ('26','28','29') THEN 'VOID'
WHEN CO_STATUS IN ('42','43','45') THEN 'IN PROCESS'
WHEN CDML_CONSIDER_CHG <> 0
AND CDML_DISALL_AMT = CDML_CONSIDER_CHG
AND CDML_PAID_AMT = 0 THEN 'DENIED'
ELSE 'PAID'
END) AS CLM_ADJ_RESULT,
CDML_DISALL_EXCD AS EXPLAIN_CD,
EXCD_SHORT_TEXT AS EXPLAIN_DESC,
(CASE WHEN CLHP.TAG_ID IS NULL THEN 'HCFA'
ELSE 'UB92' END) AS CLM_TYPE,
CLHP_FAC_TYPE || CLHP_BILL_CLASS || CLHP_FREQUENCY AS BILL_TYPE,
SUBSTR(CDML.IPCD_ID,3,8) AS PROC_CD,
SUBSTR(CDML.IPCD_ID,7,2) AS PROC_MOD1,
IDCD_ID AS DIAG_CD,
CDML.RCRC_ID AS REV_CD,
CLHP_INPUT_AGRG_ID AS SUBMIT_DRG_CD,
AGRG_ID AS FINAL_DRG_CD,
CLHP_COVD_DAYS AS DAYS_PAID,
CDML_UNITS AS UNITS_SUBMITTED,
CDML_UNITS_ALLOW AS UNITS_PAID
FROM CMC_TAG_CLAIM TAG
INNER JOIN CMT_PROT_PROV PRPR
ON TAG.PRPR_ID = PRPR.PRPR_ID
AND TAG.TRC_CK = 4
AND TAG.CSCS_ID = 'LB03'
AND TAG.TAG_PAID_DT BETWEEN '03/01/09' AND '04/12/09'
AND PRPR.PRPR_ID in ('142BRE356','142CE486','142DD345')
INNER JOIN CMC_CDML_CL_LINE CDML
ON TAG.TAG_ID = CDML.TAG_ID
INNER JOIN CMC_SBSB_SUBSC SBSB
ON TAG.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 TAG.TAG_ID = CLHP.TAG_ID;