Page 1 of 1

SSRS_SESSION

Posted: Mon Feb 20, 2017 5:53 pm
by robinwilson16
Lists academic years

Code: Select all

CREATE FUNCTION [dbo].[SSRS_SESSION] ()
RETURNS TABLE
AS
RETURN

SELECT 
	Code = SES.s_name, 
	Description = SES.s_name
FROM ulive.dbo.capd_session AS SES
WHERE
	SES.s_type = 'FY'
	AND SES.s_start >= DATEADD ( year, -4, GetDate() )
	AND SES.s_end <= DATEADD ( year, +2, GetDate() )