UFN_EVENTSTAFFRESOURCE_GETASSIGNMENTS

Returns the constituents assigned to a given staff resource.

Return

Return Type
table

Parameters

Parameter Parameter Type Mode Description
@EVENTSTAFFRESOURCEID uniqueidentifier IN

Definition

Copy


            create function dbo.UFN_EVENTSTAFFRESOURCE_GETASSIGNMENTS
            (
                @EVENTSTAFFRESOURCEID uniqueidentifier
            )
            returns table
            as return
                select EVENTSTAFFRESOURCEASSIGNMENT.ID,
                        EVENTSTAFFRESOURCEASSIGNMENT.CONSTITUENTID,
                        (select top 1 NUMBER
                            from dbo.UFN_CONSTITUENT_GETPHONES(EVENTSTAFFRESOURCEASSIGNMENT.CONSTITUENTID)
                            where (ISPRIMARY = 1)) as PRIMARYPHONE
                from dbo.EVENTSTAFFRESOURCEASSIGNMENT
                where EVENTSTAFFRESOURCEASSIGNMENT.EVENTSTAFFRESOURCEID = @EVENTSTAFFRESOURCEID