DROP TABLE CPSS_ID;
CREATE TABLE CPSS_ID AS
SELECT DISTINCT GROUP_ID FROM
trnsl_gl_co_chk_stock_id_cd AS UNIT,primy_grp_id_cd
origtg_primy_grp_id_cd AS ORIG_GRP,grp_origtg_src_cd
grp_sell_ovr_dT AS GRP_SELL_OVR_DT,grp_name
trnsl_cstmr_typ_cd AS CUST_TYP,
NVL(SUM(DECODE (EXPRC_CAT_CD,‘02’, WHOLE_MBR_CNT,0)),0) AS DENTAL_MBRS,
NVL(SUM(DECODE (EXPRC_CAT_CD,‘10’,WHOLE_MBR_CNT,0)),0) AS DRUG_MBRS,
NVL(SUM(pd_amt),0) AS CLAIMS_PAID
FROM dwa_vw.ices_denorm_vw @RRA_TRG_PRD
AND TRNSL_GL_CO_CHK_STOCK_ID_CD IN (‘ID01’,‘ID99’)
dwa_proc_earnd_mo_key,
trnsl_gl_co_chk_stock_id_cd,
primy_grp_id_cd,
origtg_primy_grp_id_cd,
grp_origtg_src_cd,
grp_sell_ovr_dT,
grp_name)
WHERE ORIG_GRP_SRC IN (‘TRG’);
Hello,
I have a query that I use to run in SQL Nav. There were define variables in the query that do not work in TOAD for Data Analysts. I now need to convert these define statements in the SQL so that TOAD will prompt for new inputs. I have a prompt that asks for the earned mnth, such as ‘200908’ or ‘200909’. I keep getting the same error:
ORA-01036: illegal variable name/number
I can change the type of Bind Variable, but nothing seems to work. I need help…here is some of the SQl I am using:
(SELECT dwa_proc_earnd_mo_key AS EARNED_MONTH, AS GROUP_ID,AS ORIG_GRP_SRC, AS GROUP_NAME, NVL(SUM(DECODE (EXPRC_CAT_CD,‘01’, WHOLE_MBR_CNT,0)),0) AS MEDICAL_MBRS,NVL(SUM(DECODE (EXPRC_CAT_CD,‘06’, WHOLE_MBR_CNT,0)),0) AS CAP_DENTAL_MBRS,NVL(SUM(incm_amt),0) AS PREMIUM, WHERE dwa_proc_earnd_mo_key = :EARNED_MNTHGROUP BY trnsl_cstmr_typ_cd,