AnsweredAssumed Answered

Help with NSQL

Question asked by Erick.Espinosa-CAMx Employee on Jun 21, 2013
Latest reply on Jul 1, 2013 by fpena
Hi all,

I have a problem with a query, I am getting "NPT-217: This query produced duplicate dimensional data. The results shown here may be invalid or incomplete." but when I run on SQL it runs fine.

Any suggestion?

SELECT @SELECT:DIM:USER_DEF:IMPLIED:RESOURCE:Resources.ID:id@,
@SELECT:DIM_PROP:USER_DEF:IMPLIED:RESOURCE:Resources.FULL_NAME:name@,
@SELECT:DIM_PROP:USER_DEF:IMPLIED:RESOURCE:
case
when iSNULL((select H2.PARENT_ID from INV_HIERARCHIES H1, INV_HIERARCHIES H2 where H1.CHILD_ID = slices.INVESTMENT_ID
and H1.PARENT_ID is not null and H1.PARENT_ID = h2.CHILD_ID and H2.PARENT_ID is not null), 0) != 0
then ( select INVESTMENTS.NAME from (select H2.PARENT_ID from INV_HIERARCHIES H1, INV_HIERARCHIES H2 where H1.CHILD_ID = slices.INVESTMENT_ID
and H1.PARENT_ID is not null and H1.PARENT_ID = h2.CHILD_ID and H2.PARENT_ID is not null) AS Parent, INV_INVESTMENTS INVESTMENTS
where INVESTMENTS.ID = Parent.PARENT_ID)
else (select INVESTMENTS.NAME from (select H1.PARENT_ID from INV_HIERARCHIES H1 where H1.CHILD_ID = slices.INVESTMENT_ID and H1.PARENT_ID is not null) as Parent, INV_INVESTMENTS INVESTMENTS
where INVESTMENTS.ID = Parent.PARENT_ID)
end:project_name@,

@SELECT:DIM:USER_DEF:IMPLIED:slices:slices.SLICE_DATE:date@,
@SELECT:metric:USER_DEF:IMPLIED:sum(slices.SLICE):time:slices@

from SRM_Resources Resources inner join PRJ_BLB_SLICES_M_ALC slices ON Resources.ID = slices.RESOURCE_ID
where Resources.PERSON_TYPE = 300 and Resources.IS_ACTIVE = 1
AND @FILTER@
Group by Resources.ID,
Resources.FULL_NAME,
slices.INVESTMENT_ID,
slices.SLICE_DATE


Thanks!

Erick Espinosa

Outcomes