(select distinct goods_sn, site_ids, split (site_ids, ', ') array from the PRM
Where goods_sn='abcdefg')
Cross join unnest (array) t (site_id)
You can perform
Select a. *, b.s ite_nm from
(select *, site_id from
(select distinct goods_sn, site_ids, split (site_ids, ', ') array from the PRM
Where goods_sn='abcdefg')
Cross join unnest (array) t (site_id)) a left join
(select distinct site_id, site_nm from pub) b on a.s ite_id=b.s ite_id
Is an error, prompt the Column 'a.s ite_id' is ambiguous
How to solve?
CodePudding user response:
Reference: https://bbs.csdn.net/topics/240002706