I have the 2 following table :
Source table with 2 columns (large number of records) :
columnA columnB
abcdez defghp
azerty ghjklm
...
...
Mapping table with source value and new value. All columnA and columnB values in the source table have a matching value as source_value in the mapping table, with a corresponding new_value.
source_value new_value
abcdez 123456
defghp 999999
azerty 444444
ghjklm 101010
...
...
...
I would like to use sql to build a view of my source table, with their replacement values from my mapping table :
View1 :
columnA columnB
123456 999999
444444 101010
...
...
Thanks ahead for your help
2
Answers
You need to join to the mapping table twice.
If you think of a join as a correlation between specific rows of each table, this makes a bit more sense.