View shrdb.LAWFS.ENPUSERGROUPLIST | Generated by SchemaSpy |
| |||||||||||||||||||||||||||||||||||||||||||||||
Analyzed at Thu Dec 13 15:47 CST 2012 |
View Definition:
SELECT A.USERNAME AS GROUPNAME, B.GROUPID AS GROUPID, C.USERNAME AS USERNAME, B.USERID AS USERID FROM ENPUSERMAP A, ENPGROUPMAP B, ENPUSERMAP C WHERE
A.ENTRYTYPE = 2 AND A.USERID = B.GROUPID AND
C.ENTRYTYPE = 1 AND C.USERID = B.USERID
UNION
SELECT A.USERNAME AS GROUPNAME, A.USERID AS GROUPID, CAST('' AS NVARCHAR2(250)) AS USERNAME , -1 AS USERID FROM ENPUSERMAP A
WHERE A.ENTRYTYPE = 2 AND A.USERID NOT IN (SELECT DISTINCT(GROUPID) FROM ENPGROUPMAP) AND A.USERID > 1
UNION
SELECT CAST('' AS NVARCHAR2(250)) AS GROUPNAME, -1 AS GROUPID, A.USERNAME , A.USERID FROM ENPUSERMAP A
WHERE A.ENTRYTYPE = 1 AND A.USERID NOT IN (SELECT DISTINCT(USERID) FROM ENPGROUPMAP) AND A.USERID > 1
Possibly Referenced Tables/Views:
|