hi there,
I have some code in the text editor of my report:
I have some code in the text editor of my report:
Code:
SELECT
NBI_PROJECT_CURRENT_FACTS.CUSTOMER,
NBI_PROJECT_CURRENT_FACTS.CUSTOMER_CODE,
ODF_CA_PROJECT.DSTI_TRUE_CLIENT3,
SRM_COMPANIES.COMPANY_NAME,
PROJCLASS.DESCRIPTION,
dsti_proj_ref,
dsti_proj_act,
SUM(PRTIMEENTRY.PRACTSUM/3600)
FROM
PRTIMESHEET,
PRTIMEENTRY,
PRTIMEPERIOD,
PRCHARGECODE,
SRM_PROJECTS,
SRM_RESOURCES,
ODF_CA_PROJECT,
PRASSIGNMENT,
PRTASK,
PAC_MNT_RESOURCES,
NBI_PROJECT_CURRENT_FACTS,
SRM_COMPANIES,
NBI_DIM_OBS,
NBI_RESOURCE_CURRENT_FACTS,
PROJCLASS
WHERE
PROJCLASS.PROJCLASS = NBI_PROJECT_CURRENT_FACTS.PROJECT_CLASS
AND nbi_RESOURCE_CURRENT_FACTS.RESOURCE_ID = srm_resources.ID
AND nbi_resource_current_facts.obs1_unit_id = nbi_dim_obs.obs_unit_id
AND ODF_CA_PROJECT.DSTI_TRUE_CLIENT3 = SRM_COMPANIES.COMPANY_ID (+)
AND NBI_PROJECT_CURRENT_FACTS.PROJECT_ID = SRM_PROJECTS.ID (+)
AND PRTASK.PRID = PRASSIGNMENT.PRTASKID
AND PRASSIGNMENT.PRID = PRTIMEENTRY.PRASSIGNMENTID
AND PRTIMEENTRY.PRCHARGECODEID = PRCHARGECODE.PRID
AND PRTIMEENTRY.PRTIMESHEETID = PRTIMESHEET.PRID
AND PRTIMESHEET.PRTIMEPERIODID = PRTIMEPERIOD.PRID
AND PRTIMESHEET.PRRESOURCEID = SRM_RESOURCES.ID
AND PRTASK.PRPROJECTID = SRM_PROJECTS.ID
AND SRM_PROJECTS.ID = ODF_CA_PROJECT.ID
AND PAC_MNT_RESOURCES.ID = SRM_RESOURCES.ID
AND PRTIMESHEET.PRSTATUS IN ( 3, 4)
AND NBI_PROJECT_CURRENT_FACTS.IS_ACTIVE = 1[code]
In the ObtainSelectStatement I then add to the where clause and add the group by.
as soon as I do this (which I need to in order for the aggregate function in the SELECT statement to work)
I get the error:
"Datatypes of the bound variable and column are not compatible"
If I take out the aggregate function it works perfectly well.
If I dont add parameters in the ObtainSelectStatement, and just have the entire query in the text editor (with aggregates and group by) it works fine..
can anyone suggest where I am going wrong?
thanks in advance