Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

joining two tables using SUBSTR - response (3) by gerardo

$
0
0

Try this one:
 
sel * from tb1 a , tb2 b
where b.cntry_code like '%'||trim(a.cntry_code)||'%' ;

You will get these pairs:
a.cntry_code    b.cntry_code
FL                      FL,CHG,MN
DET                   DET
CHG                  FL,CHG,MN
MN                    FL,CHG,MN
MN                    MN,MN
 
 
Regards


Viewing all articles
Browse latest Browse all 14773

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>