USP_FAFGETGROUPSBYEVENT
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@EVENTID | uniqueidentifier | IN |
Definition
Copy
create procedure dbo.USP_FAFGETGROUPSBYEVENT
(
@EVENTID uniqueidentifier = null
)
as
-- This is essentially a copy of USP_SEARCHLIST_FAFEVENTGROUP, but with a null record tacked onto the front,
-- for use in the Groups Hierarchy report parameters.
-- select null as ID, 'All groups' as NAME
-- union all, 'All groups'
select T.ID, T.NAME
from dbo.TEAMFUNDRAISINGTEAM T
inner join dbo.TEAMEXTENSION TE ON TE.TEAMFUNDRAISINGTEAMID = T.ID
where TE.EVENTID = @EVENTID
and t.PARENTTEAMID is null
order by NAME asc