sql - How to get rid of special character in Netezza columns -


i transferring data 1 netezza database using talend, etl tool. when pull data varchar(30) field , try put in new database's varchar(30) field, gives error saying it's long. logs show field has whitespace @ end followed square, representing character can't figure out. attached screenshot of logs below. have tried writing sql pull field , replace thought crlf, no luck. when select on field , length, has few characters see, there , want rid of it. trimming not anything.

this sql not return length shorter doing length() on column itself. know else be?

 select   length(trim(translate(translate(<column>, chr(13), ''), chr(10), ''))) len_modified 

snapshot of logs

note last column in logs, see square in brackets, supposed show last character examined.

save data larger target table size works. if 30 character data put in 500 character table. work. through character character on fields longest determine character being added. use commands ascii() determine ascii value of individual characters , beginning , end. getting additional character in beginning or end. determine character data , write code remove or never load fits in 30 character column. or leave target column longer , include additional characters. example varchar(30) becomes varchar(32) (waste space don't alter data comes in you).


Comments

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

serialization - Convert Any type in scala to Array[Byte] and back -

SonarQube Plugin for Jenkins does not find SonarQube Scanner executable -