'D'
and (select count(c_coil_no)
from c_tbf03_spec_mill
where roll_no = (select m.ROLL_NO from c_tbf03_spec_mill m where m.C_COIL_NO = ?)) =
(select count(c_coil_no)
from c_tbf03_spec_mill
where roll_no = (select m.ROLL_NO from c_tbf03_spec_mill m where m.C_COIL_NO = ?)
and (STATUS_CD = 'D' OR STATUS_CD = 'E'))
]]>
'D'
and (select count(c_coil_no)
from s_tbf03_spec_mill
where roll_no = (select m.ROLL_NO from s_tbf03_spec_mill m where m.C_COIL_NO = ?)) =
(select count(c_coil_no)
from s_tbf03_spec_mill
where roll_no = (select m.ROLL_NO from s_tbf03_spec_mill m where m.C_COIL_NO = ?)
and (STATUS_CD = 'D' OR STATUS_CD = 'E'))
]]>