select * from member_service where service_member_kind = '1' and (mail_chk = '0' and datediff(d , convert(varchar , getdate() , 23) , edate) = 7) or (mail_chk1 = '0' and datediff(d , convert(varchar , getdate() , 23) , edate) = -1) order by idmail send : 0