Sie könnten versuchen, Unterabfragen zu erstellen, die die geänderten Spalten enthalten, und dann die Tabellen wie folgt verknüpfen:
Select Mt1.T1_Col1, Mt1.T1_Col3,Count(Mt2.T2_Col1)
From
(Select T1.Col1 As T1_Col1, T1.Col3 As T1_Col3, '%,' || T1.Col1 || ',%' As T1_Col1_New From T1) Mt1,
(Select T2.Col1 As T2_Col1, T2.Col2 As T2_Col2, T2.Col3 As T2_Col3, ',' || T2.Col2 || ',' As T2_Col2_New From T2) Mt2
Where Mt1.T1_Col3 = Mt2.T2_Col3 (+)
And Mt1.T1_Col1_New Like Mt2.T2_Col2_New (+)
Group By Mt1.T1_Col1, Mt1.T1_Col3;
Ich habe hier Inline-Unterabfragen und Outer-Joins kombiniert.
Referenzen:
- http://www.orafaq.com/wiki/Inline_view
- http://www.oracle- base.com/articles/9i/ansi-iso-sql-support.php