UFN_EDUCATIONALINSTITUTION_GETSTATEFROMCONSTITUENT
Gets the state of the educational institution from the associated organization.
Return
| Return Type |
|---|
| uniqueidentifier |
Parameters
| Parameter | Parameter Type | Mode | Description |
|---|---|---|---|
| @EDUCATIONALINSTITUTIONID | uniqueidentifier | IN |
Definition
Copy
create function dbo.UFN_EDUCATIONALINSTITUTION_GETSTATEFROMCONSTITUENT
(
@EDUCATIONALINSTITUTIONID uniqueidentifier
)
returns uniqueidentifier
with execute as caller
as begin
declare @RETVAL uniqueidentifier;
select @RETVAL = ADDRESS.STATEID
from dbo.CONSTITUENT
inner join dbo.ADDRESS
on ADDRESS.CONSTITUENTID = CONSTITUENT.ID
where (ADDRESS.ISPRIMARY = 1) and
(CONSTITUENT.ID = @EDUCATIONALINSTITUTIONID);
return @RETVAL;
end