流转系统中停于nodeno=2节点,且为XXX的案件信息

select distince registno from prplwlog
where handlercode="4205016110"
  and nodeno=2
  and registno in (select l.registno from prplwlog l,prplregist r
where l.registno=r.registno
  and r.reportdate<"2006-07-25"
  and r.comcode[1,4]="4205"
  and r.canceldate is null
  and r.acceptflag="Y"
group by 1
having max(l.nodeno)=2) 

你可能感兴趣的:(SQL,null)