Hello All,
I have found that using APT_ORACLE_PRESERVE_BLANK = True option also Pads blank spaces behing the passed string.
i.e. eventhough i pass only 5 or 6 or 7 characters to a field defined as Varchar2(12) in database
it is actually stored as 12 instead of 5 or 6 or 7 characters padding blank spaces behind the sting which causes problem while lookup.
Database: Oracle 10i
Wrtite Mode: LOAD -> truncate
tried all sort of way like trim,trimb or trimF or index of left but did not work etc...
Please suggest how to resolve this issue.
Thank You
Padding blank spaces behing the passed string in Oracle
Moderators: chulett, rschirm, roy
Re: Padding blank spaces behing the passed string in Oracle
have u tried trimming using the function -
Left(Trim(col_name),Len(Trim(col_name)))
Left(Trim(col_name),Len(Trim(col_name)))
I'm not at a system where I can check, but I seem to remember that Oracle VarChar() and VarChar2() act a bit differently when it comes to padding. Can you try to export a VarChar() column as well and see if it is still padded to a fixed length; I think it might not be.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
As I mentioned,despite of use of Trim or its derivative,its still padding while loading into database.
How to workout this as when I am changing datatype from VarChar2() to VarChar() still its appearing as VarChar2() in table.ArndW
I'm not at a system where I can check, but I seem to remember that Oracle VarChar() and VarChar2() act a bit differently when it comes to padding. Can you try to export a VarChar() column as well and see if it is still padded to a fixed length; I think it might not be.