子查询有多笔资料时,使用wm_concat将资料合成一笔,用逗号隔开
select b.INGOT_ID,( select wm_concat(distinct aa.chamber_id) from mes_wip_lot aa , mes_wip_comp bb where aa.facility=bb.facility and aa.lot_no=bb.lot_no and bb.SUB_TYPE='PROD' and b.facility=aa.facility and b.ingot_id=bb.ingot_id) Chamber_A from whm2010 b where b.REC_DATE = '20200804'