Assuming cmisuser is required, the following 2 results were found.
Type', sd.[Notes] AS 'Booking Notes', c.[Name] AS 'Contact', c.[Company] AS 'Dept', c.[Phone] AS 'Phone' FROM [CMISdata].[cmisuser].[SLOTDETAILS] sd INNER JOIN [CMISdata].[cmisuser].[TIMETABLE] tt ON tt.[SlotId] = sd.[SlotId] and tt.[SetId] = sd.[SetId]...
1, 3) + '-' + CAST(DATEPART(yyyy, DATEADD(d, 6, calendar.StartDate)) AS VARCHAR(4))) AS CalendarWeek FROM cmisuser.WEEKSTRUCTURE calendar /* specific to our calendars WHERE calendar.SetID=( SELECT TOP 1 acyear.SetID FROM cmisuser.WEEKSTRUCTURE acyear...