UFN_APPUSER_GETSYSTEMROLELIST
Returns a table of IDs for all system roles in which the given APPUSERID is a member.
Return
Return Type |
---|
table |
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@APPUSERID | uniqueidentifier | IN |
Definition
Copy
CREATE FUNCTION dbo.UFN_APPUSER_GETSYSTEMROLELIST(@APPUSERID uniqueidentifier)
/*
Returns a table of IDs for all system roles in which the given APPUSERID is a member.
*/
returns table
as
return
(
select
SRAU.ID, SR.NAME, SRAU.SYSTEMROLEID, cast(1 as bit) as ISMEMBER
from
dbo.SYSTEMROLE as SR left outer join dbo.SYSTEMROLEAPPUSER as SRAU on SR.ID = SRAU.SYSTEMROLEID
where
SRAU.APPUSERID = @APPUSERID
)