I am using Microsoft SQL Server. I have two tables
- Cost Center - A list of all our production processes.
- Scheduled Process - A list of jobs that are scheduled to go through each Cost Center
My table Cost Center looks as below
CostCenterCode CostCenterDesc
------------------------------
123 Print
456 Stich
789 Fold
999 Ship
My table Process Schedule looks as below
JobNumber StartDate ScheduledHours CostCenterCode
------------------------------------------------------
12345 2020-01-01 33 123
12345 2020-01-01 33 456
12345 2020-01-01 33 999
Now based on my above dataset, cost center 789 does not have anything scheduled. I want to write a query that will show what is scheduled for each cost center each day. Cost Center 789 does not have anything scheduled but it should still show that cost center with 0 hours.