Viewing 6 posts - 1 through 6 (of 6 total)
Would this work?
Creates schedules and shifts tables.
USE [CCAP]
GO
/****** Object: Table [dbo].[Schedules] Script Date: 5/7/2019 1:18:38 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [#Schedules](
[ScheduleName] [varchar](30) NULL,
[ScheduleBeginDay] [varchar](10) NULL,
[ShiftName] [varchar](30) NULL,
[ScheduleStart] [datetime]...
May 7, 2019 at 6:21 pm
Jonathan AC Roberts, I popped your code into my editor and ran it.
Ran without modification. Kudos to you for doing that without being able to test.
It almost worked perfectly in...
May 7, 2019 at 5:13 pm
You are correct that the distinct is not needed.
The USE CCAP was in there twice because i was testing code in SSMS and needed it in the second spot while...
May 7, 2019 at 4:48 pm
the first issue I see with the code above from Jonathan AC Roberts is that the schedule times would only show if day 1 has a person scheduled.
May 7, 2019 at 2:42 pm
Solved: based on the following suggestion from another programmer: Instead of a single date, @startDate, load all dates into a dates table, then left join from those dates to the...
May 7, 2019 at 2:28 pm
SSCoach, sorry about that. I was fiddling with the code and forgot to change it back.
from @startDate
left outer join Schedules day1
should be
from  Schedules day1
May 7, 2019 at 1:19 pm
Viewing 6 posts - 1 through 6 (of 6 total)