Hi ,
From the sample data you provide and join , I can see that you need to extract the string to match, like substr. This is going to be expensive. Just as a starting point you can think this just as a sample script. You can modify as per your reqt.
select t1.cola,t1.colb,case when T1.ColA=substr(T2.ColA,1,5) then t1.colc end from Table1 T1
left join Table2 T2
on T1.ColA=substr(T2.ColA,1,5)
and T1.ColB = T2.ColB
Cheers,
Raja
Hi ,
From the sample data you provide and join , I can see that you need to extract the string to match, like substr. This is going to be expensive. Just as a starting point you can think this just as a sample script. You can modify as per your reqt.
select t1.cola,t1.colb,case when T1.ColA=substr(T2.ColA,1,5) then t1.colc end from Table1 T1
left join Table2 T2
on T1.ColA=substr(T2.ColA,1,5)
and T1.ColB = T2.ColB
Cheers,
Raja