Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a batch job which is trying to load data from a .dat file into an Oracle table.

Below is the script within our control file:

WHEN (1:1)="1"
A_id                       POSITION(0002:0005)    CHAR             ,
c_code                     POSITION(0006:0008)    CHAR             ,
status                     POSITION(0009:0009)    CHAR             ,
FTC                        POSITION(0011:0024)    char
                           "to_number(:FTC,'S99,999,999.99')"      ,
TCER                       POSITION(0029:0038)    decimal external ,
ATC                        POSITION(0039:0052)    char
                           "to_number(:ATC,'S99,999,999.99')"      ,
FTR                        POSITION(0053:0066)    char
                           "to_number(:FTR,'S99,999,999.99')"      ,
TRER                       POSITION(0067:0080)    decimal external ,
ATR                        POSITION(0081:0094)    char

Records in the file:

1GSXBGBPNR        384.66    0.60801391        632.00       -384.66    0.60801391       -632.00
1GSXBEURNR         10.42    0.70548409         14.00          0.00    0.00000000          0.00
1GSXBEURRE        136.01    0.70533631        192.00          0.00    0.00000000          0.00
1GSXBUSDRE         95.91    0.90472597        106.00        -95.91    0.90472597       -106.00

While the job runs we get the ORA-01722: invalid number error error on the column FTC. How can I fix it?

share|improve this question

Your format picture, 'S99,999,999.99', requires that the number begin with a sign -- either "+" or "-" -- which your actual data does not contain.

Remove the S from the format picture.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.