AnsweredAssumed Answered

ORA-01008: not all variables bound

Question asked by navzjoshi00 Champion on Dec 4, 2012
Latest reply on Dec 4, 2012 by navzjoshi00
I've an NSQL which throws above mentioned error message, but, when I preview the code, and run the SQL, it runs fine -

SELECT @SELECT:DIM:USER_DEF:IMPLIED:RESOURCE:csu.user_name:Resource_ID@,
@SELECT:DIM_PROP:USER_DEF:IMPLIED:RESOURCE:SRM.FULL_NAME:Resource_name@,
@SELECT:DIM_PROP:USER_DEF:IMPLIED:RESOURCE:(select srm1.full_name from srm_resources srm1 where srm1.user_id=SRM.MANAGER_ID ):Resource_Manager_Name@,
@SELECT:DIM_PROP:USER_DEF:IMPLIED:RESOURCE:prt.prname:TaskName@,
@SELECT:DIM_PROP:USER_DEF:IMPLIED:RESOURCE:INV.CODE:project_code@,
@SELECT:DIM_PROP:USER_DEF:IMPLIED:RESOURCE:INV.NAME:project_name@,
@SELECT:DIM_PROP:USER_DEF:IMPLIED:RESOURCE:(select srmr.full_name from srm_resources srmr where SRMR.USER_ID=INV.MANAGER_ID ):project_manager@,
@SELECT:DIM_PROP:USER_DEF:IMPLIED:RESOURCE:PRTP.PRSTART:Week@,
@SELECT:METRIC:USER_DEF:IMPLIED:sum(prtimeen.practsum/3600):Total_hours@
FROM prassignment prass,
prtask prt,
srm_resources srm,
cmn_sec_users csu,
inv_investments inv,
prtimeentry prtimeen,
prtimesheet prts,
prtimeperiod prtp
WHERE
prass.prtaskid = prt.prid
AND csu.id = srm.user_id
AND srm.ID = prass.prresourceid
AND prt.prprojectid = inv.ID
and PRTIMEEN.PRASSIGNMENTID = PRASS.PRID
and PRTS.PRID = PRTIMEEN.PRTIMESHEETID
and PRTS.PRTIMEPERIODID = PRTP.PRID
and PRTS.PRSTATUS = 4
and (PRTP.PRSTART between @WHERE:PARAM:USER_DEF:DATE:PERIODFROM@ and @WHERE:PARAM:USER_DEF:DATE:PERIODTO@)
AND ( EXISTS (
SELECT 1
FROM prj_obs_associations poa, obs_units_flat_by_mode ofm
WHERE poa.unit_id = ofm.linked_unit_id
AND ( ofm.unit_id = (:param_z_dept)
OR (:param_z_dept) IS NULL
)
AND poa.record_id = srm.ID
AND poa.table_name = 'SRM_RESOURCES'
AND (ofm.unit_mode = (:param_z_deptassociationmode) or (:param_z_deptassociationmode) is null)))
AND ( EXISTS (
SELECT 1
FROM prj_obs_associations poa, obs_units_flat_by_mode ofm
WHERE poa.unit_id = ofm.linked_unit_id
AND ( ofm.unit_id = (:param_z_rso)
OR (:param_z_rso) IS NULL
)
AND poa.record_id = srm.ID
AND poa.table_name = 'SRM_RESOURCES'
AND (ofm.unit_mode = (:param_z_rsoassociationmode) or (:param_z_rsoassociationmode) is null)))
AND @FILTER@

GROUP BY
csu.user_name,
SRM.FULL_NAME,
PRT.PRNAME,
inv.code ,
INV.NAME,
INV.MANAGER_ID ,
PRTP.PRSTART,
srm.manager_id

HAVING @HAVING_FILTER@


NJ

Outcomes