X
xnfzy
Unregistered / Unconfirmed
GUEST, unregistred user!
select * from table1<br>where ..得到如下结果:<br>BA-2-CTN-1 <br>BA-2-WK-1 <br>BA-1-GBAN-2 <br>BA-2-DKA-4-16 <br>BA-2-DKA-4-05 <br>LBL-20-4 <br>E3A3121K1 <br>903W07033TG <br>DM4857TG <br>114E17830G <br>LBL-17-5.5 <br>在这个结果集中,DM4857TG 有替代的物料(BOM) DM4832T or DM1548TG, 这个替代物料来自table2,问题关键是如何把替代物料追加到主料的后一行?如果其它主料也有替代物料,又是如何追加到主料下一条?如下:<br>BA-2-CTN-1 <br>BA-2-WK-1 <br>BA-1-GBAN-2 <br>BA-2-DKA-4-16 <br>BA-2-DKA-4-05 <br>LBL-20-4 <br>E3A3121K1 <br>903W07033TG <br>DM4857TG <br> DM4832T 替代 <br>114E17830G <br> 1548EGXXPG 替代 <br>LBL-17-5.5