Trailing spaces

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
reddy
Premium Member
Premium Member
Posts: 168
Joined: Tue Dec 07, 2004 12:54 pm

Trailing spaces

Post 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
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post 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.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
remo
Participant
Posts: 7
Joined: Mon Feb 13, 2006 7:57 pm

hey

Post by remo »

Looks like u have nulls padded....nulltoempty function should help you out
remo
Post Reply