Hello,
I contact to the community because we need help about if anyone have a NSQL that include the hours incurred by resource.
I did this query, but when I put this query in a porlet, appear the following error and truncate the records result.
SELECT
@select:dim:user_def:implied:investment:inv.id:investment_code@,
@select:dim_prop:user_def:implied:investment:inv.code:investment_id@,
@select:dim_prop:user_def:implied:investment:inv.name:Nombre_de_la_inversion@,
@select:dim_prop:user_def:implied:investment:inv.odf_object_code:Tipo_de_inversion@,
@select:dim_prop:user_def:implied:investment:ta.prid:IdInternoTarea@,
@select:dim_prop:user_def:implied:investment:res.full_name:Nombre_de_recurso@,
@select:dim_prop:user_def:implied:investment:te.practsum:Horas@,
@select:dim_prop:user_def:implied:investment:tp.prstart:Inicio_del_periodo@,
@select:dim_prop:user_def:implied:investment:tp.prfinish:Fin_del_periodo@,
@select:dim_prop:user_def:implied:investment:cc.prname:Codigo_de_carga@,
@select:dim_prop:user_def:implied:investment:obs.PATH:OBS@
FROM srm_resources res
INNER JOIN prtimesheet ts ON ts.prresourceid = res.id
JOIN prtimeentry te ON te.prtimesheetid = ts.prid
LEFT JOIN prchargecode cc ON te.prchargecodeid = cc.prid
INNER JOIN prassignment asg ON asg.prid = te.prassignmentid
INNER JOIN prtask ta ON ta.prid = asg.prtaskid
INNER JOIN inv_investments inv ON inv.id = ta.prprojectid
INNER JOIN prtimeperiod tp ON ts.prtimeperiodid = tp.prid
LEFT JOIN prj_obs_associations aso ON aso.record_id = res.id and TABLE_NAME = 'SRM_RESOURCES'
left join PRJ_OBS_UNITS un on un.id = aso.UNIT_ID
left join PRJ_OBS_TYPES ut on ut.ID = un.TYPE_ID
INNER JOIN NBI_DIM_OBS obs on obs.OBS_UNIT_ID = un.ID
WHERE 1 = 1
AND @FILTER@
Best regards.
Patricio.