UFN_SESSION_GETDATES

Returns the start and end dates for a session based on the terms it contains.

Return

Return Type
table

Parameters

Parameter Parameter Type Mode Description
@SESSIONID uniqueidentifier IN

Definition

Copy


CREATE function dbo.UFN_SESSION_GETDATES(
    @SESSIONID uniqueidentifier
)
returns table
as return
    (select 
        min(STARTDATE) as STARTDATE, 
        max(ENDDATE) as ENDDATE 
    from 
        dbo.TERM
    where
        SESSIONID = @SESSIONID 
)