Assuming setid is required, the following 6 results were found.
DECLARE @GivenDate datetime, @GivenCampus varchar(100), @setId varchar(10), @weekNumber int, @siteId nvarchar(5), @baseDate datetime, @specifiedDate datetime, @specifiedCampus varchar(25) SET DATEFORMAT dmy --SET @GivenDate = '1/7/2011' --SET...
and other information' AS Tooltip FROM [SLOTDETAILS] sd INNER JOIN [TIMETABLE] tt ON tt.[SlotId] = sd.[SlotId] and tt.[SetId] = sd.[SetId] INNER JOIN [CONTACT] c ON c.[ContactId] = sd.[Contact] and c.[SetId] = sd.[SetId] INNER JOIN [WEEKMAPNUMERIC] wm...
T-SQL Record Separatorhttp://mail.joellipman.com/articles/database/t-sql/t-sql-record-separator.html
CONVERT(CHAR(10), GETDATE(), 103) AS 'WeekStart', CONVERT(CHAR(10), DATEADD(day, 6, GETDATE()), 103) AS 'WeekEnd', SD.[SetId] AS 'Set' FROM [pretendDatabase].[pretendSchema].[SLOTDETAILS] sd INNER JOIN [pretendDatabase].[pretendSchema].[TIMETABLE] tt ON...
DAY), '\%e-\%b-\%y') AS Fri, WEEKOFYEAR(calendar.StartDate) AS CalendarWeek FROM joes_weekstructure calendar WHERE calendar.SetID=( SELECT acyear.SetID FROM joes_weekstructure acyear WHERE NOW() >= acyear.StartDate ORDER BY acyear.StartDate DESC LIMIT...
FROM [ROOMEQUIPMENT] re INNER JOIN [EQUIPMENT] eq ON eq.EquipId=re.EquipId WHERE re.RoomId=@GivenRoom AND re.SetId=@setId This seems to have problems because when there are no matching rows (so zero results), BIDS doesn't seem to know what to do with...
these are academic week numbers. So I can't use the built-in functions. The current structure looks similar to this: ID SetID WeekNumber StartDate --------- ---------------- ---------------------- ---------------------------- 1 2011/2012 1 2011-07-18...