UFN_CONSTITUENT_GETCURRENTGROUPROLES
Return
| Return Type |
|---|
| table |
Parameters
| Parameter | Parameter Type | Mode | Description |
|---|---|---|---|
| @GROUPMEMBERID | uniqueidentifier | IN |
Definition
Copy
CREATE function dbo.UFN_CONSTITUENT_GETCURRENTGROUPROLES(
@GROUPMEMBERID uniqueidentifier
)
returns table
as return
select
GROUPMEMBERROLE.ID as ID,
GROUPMEMBERROLECODE.DESCRIPTION as NAME,
GROUPMEMBERROLE.STARTDATE as STARTDATE,
GROUPMEMBERROLE.ENDDATE as ENDDATE
from dbo.GROUPMEMBERROLE
inner join dbo.GROUPMEMBERROLECODE on GROUPMEMBERROLECODE.ID = GROUPMEMBERROLE.GROUPMEMBERROLECODEID
where GROUPMEMBERROLE.GROUPMEMBERID = @GROUPMEMBERID
and (GROUPMEMBERROLE.STARTDATE is null or GROUPMEMBERROLE.STARTDATE <= GETDATE())
and (GROUPMEMBERROLE.ENDDATE is null or GETDATE() <= GROUPMEMBERROLE.ENDDATE)