select distinct w.lot,w.wo,'['||m.nm||']'|| w.lot||' '||w.wo as nm,m.id mat_id,r.id routing_id,t.id tech_id ,r1.proc_id,r2.para_id
from dps.wo_trace w,dps.wo_s_trace ws,pub.mat m,pub.routing r,pub.tec t,spc.rel_tec_proc r1,spc.rel_proc_para r2 where r1.tech_id=t.id and
r2.proc_id=r1.proc_id and w.wo=ws.wo and w.routing_id=r.ctrl and w.tech_id=t.ctrl and
w.mat_id=m.cd and ws.oper_flag=3 and
w.state_id=4 and mat_family_id in (3,4,5)
select distinct w.lot,w.wo,'['||m.nm||']'|| w.lot||' '||w.wo as nm,m.id mat_id,r.id routing_id,t.id tech_id
from dps.wo_trace w,dps.wo_s_trace ws,pub.mat m,pub.routing r,pub.tec t where w.wo=ws.wo and w.routing_id=r.ctrl and w.tech_id=t.ctrl and
w.mat_id=m.cd and ws.oper_flag=3 and
w.state_id=4 and mat_family_id in (3,4,5)
浙公网安备 33010602011771号