I want to remove leading and trailing tabs in a column... I tried trim function and its not working... is there any other means we can remove the leading or trailing tabs...
you can use a simple substr
case when substr(cola,1,1) = '\t' then substr(cola,2) else cola end
'\t' need to be replaced with a tab...
case when characters(cola) = 1
then case when cola = '\t' then '' else cola end
else case case when substr(cola,charcaters(cola),1) = '\t' then substr(cola,1,characters(cola)-1) else cola end
if you are on 13.1 make SQL UDFs out of this to have nicer code
And check also
there are some very useful udfs...
Thanks Dieter.. it works like charm... I am new to teradata... will u please tell me whats this option means ('09'xc)... what are the other values that we can use it in here...
Ulrich your method didnt yield the expected results...