AnsweredAssumed Answered

Permissions Group for user - Report

Question asked by Patricio_1979 on Jan 9, 2018
Latest reply on Jan 9, 2018 by Aurora_Gaimon

Hello community,

 

I contact with you because we need a new report that list the users and the group of permissions that he has. I writed in SQL the following query, but I have some problems with the "order by" when I try to translate the SQL to NSQL.

 

IN SQL:
SELECT
IdRecurso IdRecurso,
NombreCompleto NombreCompleto,
NombreGrupo NombreGrupo,
Descripcion Descripcion,
UsuarioActivo UsuarioActivo
FROM
(
SELECT
S.UNIQUE_NAME IdRecurso,
S.FULL_NAME NombreCompleto,
G.GROUP_NAME NombreGrupo,
G.DESCRIPTION Descripcion,
S.IS_ACTIVE UsuarioActivo

FROM CMN_SEC_GROUPS_V G, CMN_SEC_USER_GROUPS UG,SRM_RESOURCES S

WHERE G.LANGUAGE_CODE='es'
AND G.GROUP_ROLE_TYPE='GROUP'
AND UG.GROUP_ID = G.ID
AND UG.USER_ID=S.USER_ID
AND s.IS_ACTIVE=1
AND G.PRINCIPAL_TYPE IS NULL

)T
ORDER BY NombreCompleto ASC

 

IN NSQL
SELECT
@SELECT:DIM:USER_DEF:IMPLIED:USEREC:IdRecurso:IdRecurso@,
@SELECT:DIM_PROP:USER_DEF:IMPLIED:USEREC:NombreCompleto:NombreCompleto@,
@SELECT:DIM_PROP:USER_DEF:IMPLIED:USEREC:NombreGrupo:NombreGrupo@,
@SELECT:DIM_PROP:USER_DEF:IMPLIED:USEREC:Descripcion:Descripcion@,
@SELECT:DIM_PROP:USER_DEF:IMPLIED:USEREC:UsuarioActivo:UsuarioActivo@

FROM
(
SELECT
S.UNIQUE_NAME IdRecurso,
S.FULL_NAME NombreCompleto,
G.GROUP_NAME NombreGrupo,
G.DESCRIPTION Descripcion,
S.IS_ACTIVE UsuarioActivo

FROM CMN_SEC_GROUPS_V G, CMN_SEC_USER_GROUPS UG,SRM_RESOURCES S

WHERE G.LANGUAGE_CODE='es'
AND G.GROUP_ROLE_TYPE='GROUP'
AND UG.GROUP_ID = G.ID
AND UG.USER_ID=S.USER_ID
AND s.IS_ACTIVE=1
AND G.PRINCIPAL_TYPE IS NULL

)T
AND @FILTER@
ORDER BY NombreCompleto DESC

 

 

Someone can help me to detect where is the incorrect parameter.

Best regards!

Outcomes