Select 员工编号 from 员工档案 
where 员工编号 not in (Select a.员工编号 from 考勤表 a join 当前年度表 b on a.年=b.年 and a.月 =b.月 where b.标志 = 1)

解决方案 »

  1.   

    select * from 员工档案 where 员工编号 not in (select 员工编号 from 考勤表 where exists(select 1 from 当前年度表 where 标志=1 and 年=考勤表.年 and 月=考勤表.月))
      

  2.   

    select 员工编号 from 员工档案 where 员工编号 not in ( select 员工编号 from  
    考勤表 k inner join  当前年度表 d on k.年=d.年 and k.月=d.月 where d.标志=1)
      

  3.   

    select 员工编号 
    from 员工档案 
    where 员工编号 not exists 
           (select 考勤表.年,考勤表.月 
            from 当前年度表,考勤表 
            where 当前年度表.年 = 考勤表.年 and 当前年度表.月 = 考勤表.月 and 当前年度表.标志 = 1)