我有两个表t1和t3。如果t2字符串中存在t1字符串,我需要t3具有t1字符串。
t1-[mango, apple, Top]
t2-[{Ate mango}, {it was nice apple},{you are hero}, {apple shares top}]
如果t1的字符串与t2的子字符串匹配,那么t3将 输出为t3
t3-[mango, apple, , {apple,top}]
答案 0 :(得分:0)
Select
SecondCol Result
From
(
Select
Col2 FirstCol,
UPPER(LISTAGG(Col1, ', ') WITHIN GROUP (ORDER BY Col2)) SecondCol
From
(Select Table1.T1 Col1, Table2.T1 Col2 From Table1,Table2
Where
Length(REGEXP_SUBSTR(UPPER(Table2.T1), UPPER(Table1.T1)))<>0
)
Group By Col2
);