S := 'SELECT a.JHID,a.WRAnalyzeListID,c.PlanName AS WRAnalyzeName,a.EditDate,a.Editor,c.PhaseID AS Expr1 FROM Con_WorkerRequireAnalyzeList as a INNER JOIN Plan_LabourSumList as b INNER JOIN Plan_schedulePlanList as c ON b.PhasePlanID = c.PhasePlanID ON a.JHID = b.LabSumID where a.JHID not in(select distinct JHID from lab_classjob)';