USP_DATALIST_EVENTSPEAKERS
Displays the speakers for the given event.
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@EVENTID | uniqueidentifier | IN | Input parameter indicating the context ID for the data list. |
@CURRENTAPPUSERID | uniqueidentifier | IN | Input parameter indicating the ID of the current user. |
@INCLUDESUBEVENTS | bit | IN | Include sub-events |
Definition
Copy
CREATE procedure dbo.USP_DATALIST_EVENTSPEAKERS
(
@EVENTID uniqueidentifier,
@CURRENTAPPUSERID uniqueidentifier = null,
@INCLUDESUBEVENTS bit = 0
)
as
set nocount on;
select
ES.ID,
NF.NAME as SPEAKER,
TOPIC,
SPEAKINGDATE,
SPEAKINGTIME,
ISREGISTRANT,
R.ID as REGISTRANTID,
EVENTS.NAME as EVENTNAME,
convert(nchar(2), EVENTS.LEVEL) + EVENTS.NAME as LEVELANDNAME
from
dbo.UFN_CHILDEVENTSWITHSITEACCESS(@EVENTID, @CURRENTAPPUSERID) EVENTS
inner join
dbo.EVENTSPEAKER ES on EVENTS.ID = ES.EVENTID
left join
dbo.REGISTRANT R on R.EVENTID = ES.EVENTID and R.CONSTITUENTID = ES.CONSTITUENTID
outer apply dbo.UFN_CONSTITUENT_DISPLAYNAME(ES.CONSTITUENTID) NF
where
EVENTS.ID = @EVENTID
or
@INCLUDESUBEVENTS = 1
order by
SPEAKINGDATE, SPEAKINGTIME, SPEAKER