Skip to Main Content

Oracle Database Discussions

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!

Replacing Zero?

436502Aug 9 2007 — edited Aug 10 2007
Hi,
I am having question as currently i am using REPLACE function to replace no space instead of '0' but now some of my code comes with '0' and i need to keep this zero.

current control file

LOAD DATA
INFILE '/hom/oracle/bin/jcode'
TRUNCATE
INTO TABLE jcode
TRAILING NULLCOLS
(SEQ_NUM RECNUM,
j_code POSITION(41:44) "REPLACE(:j_code, '0','')",
TITLE POSITION(11:40),
CODE POSITION(1:6)
)


Old Sample data

ADMADM1000ADMINISTRATOR ADMINISTRATION NX01
TCHADM1000TECHNICAL ADMINISTRATOR NX02
ANLADM1000ANALYST ADMINISTRATION EX03
VPSLS 1000VICE PRESIDENT SALES EX07

Loading from this file data, it wil insert NX01 as NX1 , so it was ok.
But now file comes as following:

New Sample data

ADMADM1000ADMINISTRATOR ADMINISTRATION NX01
TCHADM1000TECHNICAL ADMINISTRATOR NX02
ANLADM1000ANALYST ADMINISTRATION EX03
VPSLS 1000VICE PRESIDENT SALES EX07
VPCJZ 1000My Test FX10


Now this FX10 getting replaced as FX1 but I need to keep as FX10, how can I handle it?

Thanks,
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 7 2007
Added on Aug 9 2007
4 comments
459 views