wellster34
Programmer
Hello,
I have a data file like below:
Currency Code |Currency Description |
CAD |Canadian Dollars |
USD |US Dollars |
I have the option to skip=1 to ignore the header record and I have it terminated by |.
The issue is the tab character after the value. Is there a way to remove it? I know I can perform a RTRIM but that is for whitespsace not tab characters. Is there a DECODE logic I could use?
Here's my SQL*Loader control file:
OPTIONS (DIRECT=FALSE,SKIP=1)
LOAD DATA
INFILE '$download/$file_name.dat'
BADFILE '$bad_data/$file_name.bad'
DISCARDFILE '$bad_data/$file_name.dsc'
TRUNCATE
INTO TABLE IO.CURRENCY_REF
FIELDS TERMINATED BY '|'
TRAILING NULLCOLS
-- Identified Columns --
( CURRENCY_ID "RTRIM
CURRENCY_ID)"
, CURRENCY_DESC_TX "RTRIM
CURRENCY_DESC_TX)"
)
Thanks for your time
I have a data file like below:
Currency Code |Currency Description |
CAD |Canadian Dollars |
USD |US Dollars |
I have the option to skip=1 to ignore the header record and I have it terminated by |.
The issue is the tab character after the value. Is there a way to remove it? I know I can perform a RTRIM but that is for whitespsace not tab characters. Is there a DECODE logic I could use?
Here's my SQL*Loader control file:
OPTIONS (DIRECT=FALSE,SKIP=1)
LOAD DATA
INFILE '$download/$file_name.dat'
BADFILE '$bad_data/$file_name.bad'
DISCARDFILE '$bad_data/$file_name.dsc'
TRUNCATE
INTO TABLE IO.CURRENCY_REF
FIELDS TERMINATED BY '|'
TRAILING NULLCOLS
-- Identified Columns --
( CURRENCY_ID "RTRIM
, CURRENCY_DESC_TX "RTRIM
)
Thanks for your time