Replacing Zero in sql*loader
436502Sep 25 2007 — edited Sep 26 2007Hi,
I am running my sql*loader and i am having problem now that i was replacing(removing) leading zero and it was fine but now user wants to leave zero after the code as it is as they have added new format code.
example:
AB01 should be replace as AB1
AB02 should be replace as AB2
AB03 should be replace as AB3
AX01 should be replace as AX1
BZ09 should be replace as BZ9
But
FH01 should stays as FH01
FH02 should stays as FH02
FH10 should stays as FH10
EX10 should stays as EX10
I am using following sql*loader and it's replacing zero but we need to avoid like FX10 to to be trimmed.
LOAD DATA
INFILE 'code'
TRUNCATE
INTO TABLE CODE
TRAILING NULLCOLS
(SEQ_NUM RECNUM,
[b]s_code POSITION (41:44) "REPLACE(:S_code, '0','')",
TITLE POSITION(11:40),
J_CODE POSITION(1:6)
)
Thanks,