USP_DATALIST_EVENTGROUPS

Displays the event groups for the given event.

Parameters

Parameter Parameter Type Mode Description
@EVENTID uniqueidentifier IN Input parameter indicating the context ID for the data list.

Definition

Copy


                CREATE procedure dbo.USP_DATALIST_EVENTGROUPS(
                    @EVENTID uniqueidentifier
                    )
                as
                    set nocount on;

                    select 
                        EVENTGROUP.ID as ID,
                        EVENTGROUP.NAME as [Group name],
                        (select count(EVENTGROUPMEMBER.ID) from dbo.EVENTGROUPMEMBER where EVENTGROUPMEMBER.EVENTGROUPID = EVENTGROUP.ID) as [Number of members]
                    from 
                        dbo.EVENTGROUP                                                 
                    where                         
                        EVENTGROUP.EVENTID = @EVENTID
                    order by
                        EVENTGROUP.NAME;