... is to quickly generate a calendar for a full academic year for referencing by staff/students.
How?
Let us assume that we have a system holding a calendar in the following table (called "joes_weekstructure"):
ID ...
... ASC, t1.Finish ASC) as 'RowNumber'
FROM
(
SELECT
DATENAME(dw, tt.[WeekDay]-1) AS 'Day',
dateadd(d, tt.[WeekDay] - 1, (SELECT TOP 1 StartDate FROM [pretendDatabase].[pretendSchema].[WEEKSTRUCTURE] ...
... the table "WeekStructure" could have been any table with more than 52 rows, I'd say specify the table you will NOT be adding these rows to...
SET @count:=0;
SELECT
'2012/2013' AS SetID,
(@count:=@count+1) ...
... @GivenCampus = 'Lansdowne Campus'
SET @specifiedDate = (SELECT @GivenDate)
SET @specifiedCampus = (SELECT @GivenCampus)
-- Get columns SetId and WeekNumber from the weekstructure table based ...
We use cookies to improve your experience on our website. By browsing this website, you agree to our use of cookies. Read more about our Privacy Policy.