How to recover the data when it has been stored in fixed length by teradata ?

Database
Enthusiast

How to recover the data when it has been stored in fixed length by teradata ?

Hi all
I am in a critical situation :I do not know how to recover the data when it has been stored in fixed length by teradata .

Details:
Two days ago ,I load one column (data type:blob) from oracle into teradata(data type :BYTE(20000)) .Obviously,the column would be filled by blanks if it's length is less than 20000bytes.

But now i want to get the original data from teradata, that is :do not want the filled blanks by teradata.

Does anyone has the same problem? I am a newman here ,thanks for your help.
2 REPLIES
Senior Apprentice

Re: How to recover the data when it has been stored in fixed length by teradata ?

This is similar to storing a varchar in a char column.
You can try to remove the added HEX '00' using TRIM(TRAILING FROM col), hopefully there were no trailing 0 in your input data.

And next time better use VARBYTE :-)

Dieter
Enthusiast

Re: How to recover the data when it has been stored in fixed length by teradata ?

Hi Dieter
thanks for your response.

I tried your suggestion.unfortunately ,there are HEX'00' in the source data. when i TRIM the data in teradata, the result does not match.

do you have any other ideas?