Page 1 of 1

Trailing spaces

Posted: Fri May 18, 2007 8:22 am
by reddy
Good morning guys,

I am transfering data from ODBC stage to Oracle stage both source and target columns are varchar2 datatype.In one of the column I am getting trailing spaces.i used trim function to remove those spaces butit didn't work.I am thinking those are not spaces may be tab or some other characters.When I ran the query in the toad it is showing boxes symbol at the end.

Could you please help me on how to remove trailing characters.

Regards
Narasa

Posted: Fri May 18, 2007 8:30 am
by DSguru2B
A box character huh. See if the following works for you

Code: Select all

CONVERT(".","",OCONV(in.Col, "MCP"))
Test it out with the above command. If it works then make sure you dont have any dots in your data before accepting it as a solution.

Posted: Fri May 18, 2007 8:31 am
by chulett
You need to find out what the characters are, obviously they're not spaces. Dump to a flat file and then use a hex editor to examine the file.

hey

Posted: Thu May 24, 2007 12:57 pm
by remo
Looks like u have nulls padded....nulltoempty function should help you out