I have the following 3 tables 1- EmpLoyees as:
EmpID EmpName -------------- 100 Adam 101 Smith
2- Shifts as:
ShiftID ShiftName FromTime ToTinme ---------------------------------------- 1 Shift1 9 AM 2 PM 2 Shift2 3 PM 5 PM
3-EmpShifts as :
EMPID SHIFTID Date --------------------------------- 100 1,2 01/12/2017 100 2 02/12/2017 101 1 01/12/2017 101 1,2 02/12/2017
I need to make a select Statement to get the data Like that:
EMPID EmpName Date ShiftID ShiftName ShiftTimes ------------------------------------------------------------------------ 100 Adam 01/12/2017 1 Shift1 100 Adam 01/12/2017 2 Shift2 100 Adam 02/12/2017 2 Shift2 101 Smith 01/12/2017 2 Shift2 101 Smith 02/12/2017 1 Shift1 101 Smith 02/12/2017 2 Shift2
So How Get That.