AnsweredAssumed Answered

NPT-0108: La sección @FILTER@ es obligatoria.

Question asked by Patricio_1979 on Jan 15, 2014
Latest reply on Jan 16, 2014 by another_martink
Hello, my name is Patricio and I have a query in SQL Server 2008 R2, that compile right, but when I put this query in Clarity (NSQL) the following error appear: 
NPT-0108: La sección @FILTER@ es obligatoria.
 
Someone can help me?
This is my query in NSQL:
 
SELECT
@SELECT:DIM:USER_DEF:IMPLIED:FRENTE:osde_frente:FrenteID@,
@SELECT:DIM_PROP:USER_DEF:IMPLIED:FRENTE:NAME:Frente@,
@SELECT:DIM:USER_DEF:IMPLIED:PLAN:Presentacion:Presentacion@,
@SELECT:METRIC:USER_DEF:IMPLIED:cantidad:Demanda@,
@SELECT:METRIC:USER_DEF:IMPLIED:porcentaje:porcentaje@
 
(cast ((t.cantidad*100)as real)/sumatotal.total) as Porcentaje
FROM
(
select COUNT(*) as cantidad,osde_frente, frente.NAME, osde_presentaciones,
(select plans.name from niku.CMN_LOOKUPS_V as plans 
where plans.LANGUAGE_CODE='es' and plans.LOOKUP_TYPE='OSDE_PLAN_SEMESTRAL'
and plans.LOOKUP_CODE= osde_presentaciones)as Presentacion
from niku.INV_INVESTMENTS as inv
inner join niku.ODF_CA_INV as ca on inv.ID=ca.ID
inner join niku.CMN_LOOKUPS_V as frente on osde_frente=frente.LOOKUP_CODE 
where inv.IS_ACTIVE=1 and osde_frente is not NULL 
and frente.LOOKUP_TYPE= 'OSDE_FRENTES' and frente.LANGUAGE_CODE='es'
and osde_frente <> '0001'
and osde_frente <> '0008'
and osde_frente <> '0010'
and osde_frente <> '0018'
and osde_frente <> '0017'
and osde_tipo_incid = '5' --Mejora de Procesos y Sistemas--
and inv.id!=5011001
and inv.id!=5012002
and osde_presentaciones in(select plan_admin.osde_plan_actual from niku.odf_ca_osde_plan_admin plan_admin where plan_admin.id=5000000
union
select plan_admin.osde_plan_ante1 from niku.odf_ca_osde_plan_admin plan_admin where plan_admin.id=5000000
union
select plan_admin.osde_plan_ante2 from niku.odf_ca_osde_plan_admin plan_admin where plan_admin.id=5000000)
 
group by osde_presentaciones,osde_frente,frente.NAME
)T ,
(select COUNT(*) as total, osde_presentaciones
from niku.INV_INVESTMENTS as inv
inner join niku.ODF_CA_INV as ca on inv.ID=ca.ID
inner join niku.CMN_LOOKUPS_V as frente on osde_frente=frente.LOOKUP_CODE 
where inv.IS_ACTIVE=1 and osde_frente is not NULL 
and frente.LOOKUP_TYPE= 'OSDE_FRENTES' and frente.LANGUAGE_CODE='es'
and osde_frente <> '0001'
and osde_frente <> '0008'
and osde_frente <> '0010'
and osde_frente <> '0018'
and osde_frente <> '0017'
and osde_tipo_incid = '5' --Mejora de Procesos y Sistemas--
and inv.id!=5011001
and inv.id!=5012002
and osde_presentaciones in(select plan_admin.osde_plan_actual from niku.odf_ca_osde_plan_admin plan_admin where plan_admin.id=5000000
union
select plan_admin.osde_plan_ante1 from niku.odf_ca_osde_plan_admin plan_admin where plan_admin.id=5000000
union
select plan_admin.osde_plan_ante2 from niku.odf_ca_osde_plan_admin plan_admin where plan_admin.id=5000000)
group by osde_presentaciones
)sumatotal
WHERE T.osde_presentaciones=Sumatotal.osde_presentaciones

Outcomes