SSRS_WEEK

The shared datasets used in reports
Post Reply [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
User avatar
robinwilson16
Site Admin
Posts: 185
Joined: Sun Oct 16, 2016 6:46 pm
Forename: Robin
Surname: Wilson
College Name: FEA
Position: MIS Consultant
LinkedIn Profile: https://www.linkedin.com/in/robinwilson16
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

SSRS_WEEK

Post by robinwilson16 » Mon Feb 20, 2017 6:06 pm

Lists the week numbers and dates:

Code: Select all

CREATE FUNCTION [dbo].[SSRS_WEEK] (
	@Session VARCHAR(7)
)
RETURNS TABLE
AS
RETURN

--DECLARE @Session VARCHAR(7) = '2016-17'
	SELECT
		Code = WN.WeekNum,
		Description = FORMAT ( WN.WeekNum, '0#' ) + ' (' + FORMAT ( WN.StartDate, 'dd/MM/yyyy' ) + ' - ' + FORMAT ( WN.EndDate, 'dd/MM/yyyy' ) + ')'
	FROM GC.dbo.TVF_WeekNumbers ( @Session ) WN

	UNION ALL

	SELECT
		Code = NULL,
		Description = '-- All Weeks --'
Attachments
SSRS_WEEK.rsd
(1.05 KiB) Downloaded 75 times

Post Reply [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Who is online

Users browsing this forum: No registered users and 1 guest