UFN_CONSTITUENT_GETEDUCATIONALHISTORY
Return
Return Type |
---|
table |
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@CONSTITUENTID | uniqueidentifier | IN | |
@USEACADEMICCATALOG | bit | IN |
Definition
Copy
CREATE function dbo.UFN_CONSTITUENT_GETEDUCATIONALHISTORY
(
@CONSTITUENTID uniqueidentifier,
@USEACADEMICCATALOG bit = 0
)
returns table
as
return
(
-- This function serves the ConstituentSummaryEducationTile.View.xml, which limits the number of records returned.
-- If you change the number of records returned here, you must also update the tile's UIModel to allow one less than the new limit.
select top 501
EDUCATIONALHISTORY.ID,
EDUCATIONALINSTITUTION.NAME as INSTITUTIONNAME,
case
when @USEACADEMICCATALOG = 1 and EDUCATIONALINSTITUTION.ISAFFILIATED = 1 then ACADEMICCATALOGDEGREE.NAME
else dbo.UFN_EDUCATIONALDEGREECODE_GETDESCRIPTION(EDUCATIONALHISTORY.EDUCATIONALDEGREECODEID)
end as DEGREE,
EDUCATIONALHISTORY.CLASSOF as YEAR,
EDUCATIONALHISTORYSTATUS.DESCRIPTION as STATUS,
EDUCATIONALHISTORY.ISPRIMARYRECORD as ISPRIMARY
from dbo.EDUCATIONALHISTORY
inner join dbo.EDUCATIONALINSTITUTION on EDUCATIONALHISTORY.EDUCATIONALINSTITUTIONID = EDUCATIONALINSTITUTION.ID
left join dbo.ACADEMICCATALOGDEGREE on EDUCATIONALHISTORY.ACADEMICCATALOGDEGREEID = ACADEMICCATALOGDEGREE.ID
inner join dbo.EDUCATIONALHISTORYSTATUS on EDUCATIONALHISTORY.EDUCATIONALHISTORYSTATUSID = EDUCATIONALHISTORYSTATUS.ID
where EDUCATIONALHISTORY.CONSTITUENTID = @CONSTITUENTID
)