Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Problem in Trimming the Field

A PNov 17 2005 — edited Nov 18 2005
hello all,

first of all, this is a problem in data warehousing.
i have a very typical kind of problem. my input source is a flat file which is Fixed Width ASCII format file. Now the last column of each row which is a City_Name, has a binary value with it. the binary value is for ENTER, so that a new record goes into next line. right now i am using an expression to ltrim and rtrim the spaces around the City_Name. the expression i use is "LTRIM(RTRIM(CITY_NAME))".
But when the data is finally loaded into the target database in oracle and when i open the table through TOAD, i see the value of city name as "ALBANY ", ie. with ALBANY and spaces to fulfill the field width 25 and then a enter value, the cursor goes to next line in that field.
my requirement is to trim out all the spaces after the characters, but that binary value of ENTER is causing a problem and i dont see any particular function to remove the ENTER value in the expression. So please help me with this typical problem

Thank You.
AP.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 16 2005
Added on Nov 17 2005
9 comments
7,734 views