Oracle
 sql >> Database >  >> RDS >> Oracle

Come specificare la condizione OUTER JOIN facoltativa in Oracle 8i

Potresti provare a creare sottoquery contenenti le colonne modificate e quindi unire le tabelle come di seguito:

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;

Ho combinato qui le sottoquery inline e gli outer join.

Riferimenti:

  1. http://www.orafaq.com/wiki/Inline_view
  2. http://www.oracle- base.com/articles/9i/ansi-iso-sql-support.php