UFN_ACADEMICYEAR_GET_FORSCHOOL_BYDATE
Returns the ID of the academic year for a school starting and ending on the given dates.
Return
| Return Type |
|---|
| uniqueidentifier |
Parameters
| Parameter | Parameter Type | Mode | Description |
|---|---|---|---|
| @SCHOOLID | uniqueidentifier | IN | |
| @STARTDATE | date | IN | |
| @ENDDATE | date | IN |
Definition
Copy
create function dbo.UFN_ACADEMICYEAR_GET_FORSCHOOL_BYDATE(
@SCHOOLID uniqueidentifier,
@STARTDATE date,
@ENDDATE date
)
returns uniqueidentifier
with execute as caller
as begin
return (
select
ID
from
dbo.ACADEMICYEAR
where
SCHOOLID = @SCHOOLID
and STARTDATE = @STARTDATE
and ENDDATE = @ENDDATE
)
end