Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
1.3 kB
3
Indexable
Never
SELECT
	tt.TeacherID AS [Teacher ID],
	cs.schoolStructureValue AS [Session],
	tt.Fname AS [Teacher first name],
	tt.Lname AS [Teacher last name],
	tt.TeacherName AS [Teacher full name],
	CASE WHEN( ISNULL("Status",0)='A') THEN 'Active' ELSE 'Inactive' END  AS [Teacher status],
	tt.Phone,
	tt.Email,
	tt.Specialty,
	tt.[First Date Available],
	tt.[Last Date Available],
	tt.[Degree?],
	tt.[TESL?],
	tt.[Orientation?],
	tt.[Date of Last Observation],
	FORMAT(tt.ChangeDate,'dd-MMM-yyyy') as [Change Date],
	CASE WHEN tt.webAccess IS NULL THEN 'Not set' ELSE CASE WHEN tt.webAccess =1 THEN 'Yes' ELSE 'No' END END AS [Web access],
	CASE WHEN tt.isSupply IS NULL THEN 'Not set' ELSE CASE WHEN tt.isSupply =1 THEN 'Yes' ELSE 'No' END END AS [Is supply],
	CASE WHEN tt.FullTeacher IS NULL THEN 'Not set' ELSE CASE WHEN tt.FullTeacher =1 THEN 'Yes' ELSE 'No' END END AS [Full Teacher],
	tt.StudentLimit AS [StudentLimit],
	tt.FullTeacher AS [Full teacher],
	tt.pastModification AS [Past modification]
FROM tblteachers tt
JOIN  ISP_Cloud_Class_Schedule cs ON 
	(
        tt.teacherID = cs.MondayTeacherID OR
        tt.teacherID = cs.TuesdayTeacherID OR
        tt.teacherID = cs.WednesdayTeacherID OR
        tt.teacherID = cs.ThursdayTeacherID OR
        tt.teacherID = cs.FridayTeacherID
    )