UFN_CORPORATION_GETEMPLOYEES
Returns the employees for the given constituent based on the currently selected employee relationship types.
Return
Return Type |
---|
table |
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@ORGANIZATIONID | uniqueidentifier | IN |
Definition
Copy
CREATE function [dbo].[UFN_CORPORATION_GETEMPLOYEES](@ORGANIZATIONID uniqueidentifier)
returns table
as return
select
distinct RELATIONSHIP.RELATIONSHIPCONSTITUENTID as [ID]
from
dbo.RELATIONSHIP
inner join dbo.EMPLOYEECORPORATERELATIONSHIPTYPE on RELATIONSHIP.RELATIONSHIPTYPECODEID = EMPLOYEECORPORATERELATIONSHIPTYPE.RELATIONSHIPTYPECODEID
where
RELATIONSHIP.RECIPROCALCONSTITUENTID = @ORGANIZATIONID