i have T1 (table1)
--
Column 0|Column 1
Iff9 43410
Iff9 43490
S0013S 9045561
S90014A 8q2540
S91214D Vqq9
---
I have T2 (Table2)
----
Field1|Field2
S91214D S91214D
S91214D Iff9
S0013S null
null Iff9
Iff9 Iff9
---
I have this but it doesnt show what I need to:
select
Field1,
Field2,
case when Field1=column0 then column1 Replacement_Field1,
case when Field2=column0 then column1 Replacement_Field2
from T1, T2
where Field1=column0 or Field2=column0 or (Field1=column0 and Field2=column0)
Basically (Field1 and Field2) have the same values as Column0 in table1
Desired result is:
Field1 |Field2 |Replacement_Field1|Replacement_Field2
S91214D S91214D Vqq9 Vqq9
S91214D Iff9 Vqq9 43410,43490
S0013S null 9045561 no match
null Iff9 no match 43410,43490
Iff9 Iff9 43410,43490 43410,43490
Thanks for the help.
--------------------------
Joins are what RDBMS's do for a living