|Result ans set|
Tables and requried results again,
if you can use recursive query to walk through the distinct parts of each Col1 value, building the Description values along the way. Here is a distantly similar topic about this: http://forums.teradata.com/forum/database/help-in-recursive-query-required
For the required result, using SUBSTRING is enough but if the Col1 column having more number of commas i.e unpredicatable means that time you can go for Recursive query. using Resursive is best for alltime.
sel key, substr(col1,1,position(',' in col1)-1) A, substr(col1,position(',' in col1)+1) B, substr(B,1,position(',' in B)-1) C,
substr(B,position(',' in B)+1) D from Tab1
use col A,C and D in join condition to get the required result.