Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7571993
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T15:48:34+00:00 2026-05-30T15:48:34+00:00

We are trying to load a file created by FastExport into an oracle database.

  • 0

We are trying to load a file created by FastExport into an oracle database.
However the Float column is being exported like this: 1.47654345670000000000 E010.

How do you configure SQL*Loader to import it like that.

Expecting Control Script to look like:

OPTIONS(DIRECT=TRUE, ROWS=20000, BINDSIZE=8388608, READSIZE=8388608)
UNRECOVERABLE LOAD DATA 
infile 'data/SOME_FILE.csv'
append
INTO TABLE SOME_TABLE
fields terminated by ','
OPTIONALLY ENCLOSED BY '"' AND '"'
trailing nullcols (
    FLOAT_VALUE             CHAR(38)       "???????????????????",
    FILED02                 CHAR(5)        "TRIM(:FILED02)",
    FILED03                 TIMESTAMP      "YYYY-MM-DD HH24:MI:SS.FF6",
    FILED04                 CHAR(38)
)

I tried to_number('1.47654345670000000000 E010', '9.99999999999999999999 EEEE')

Error: ORA-01481: invalid number format model error.

I tried to_number('1.47654345670000000000 E010', '9.99999999999999999999EEEE')

Error: ORA-01722: invalid number

These are the solutions I came up with in order of preference:

  1. to_number(replace('1.47654345670000000000 E010', ' ', ''))
  2. to_number(TRANSLATE('1.47654345670000000000 E010', '1 ', '1'))

I would like to know if there are any better performing solutions.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T15:48:36+00:00Added an answer on May 30, 2026 at 3:48 pm

    As far as I’m aware there is no way to have to_number ignore the space, and nothing you can do in SQL*Loader to prepare it. If you can’t remove it by pre-processing the file, which you’ve suggested isn’t an option, then you’ll have to use a string function at some point. I wouldn’t expect it to add a huge amount of processing, above what to_number will do anyway, but I’d always try it and see rather than assuming anything – avoiding the string functions sounds a little like premature optimisation. Anyway, the simplest is possibly replace:

    select to_number(replace('1.47654345670000000000 E010',' ',''),
        '9.99999999999999999999EEEE') from dual;
    

    or just for display purposes:

    column num format 99999999999
    select to_number(replace('1.47654345670000000000 E010',' ',''),
        '9.99999999999999999999EEEE') as num from dual
    
    
             NUM
    ------------
     14765434567
    

    You could define your own function to simplify the control file slightly, but not sure it’d be worth it.

    Two other options come to mind. (a) Load into a temporary table as a varchar, and then populate the real table using the to_number(replace()); but I doubt that will be any improvement in performance and might be substantially worse. Or (b) if you’re running 11g, load into a varchar column in the real table, and make your number column a virtual column that applies the functions.

    Actually, a third option… don’t use SQLLoader at all, but use the CSV file as an external table, and populate your real table from that. You’ll still have to do the to_number(replace()) but you might see a difference in performance over doing it in SQLLoader. The difference could be that it’s worse, of course, but might be worth trying.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We are trying to load a file created by fast export into an oracle
Similar to this question , I am trying to load an HTML file into
I was trying to load a data file into mysql table using LOAD DATA
I am trying to figure out an eazy way to load CSV file into
i am trying load file after it created from /stext command line but its
I'm trying to dynamically load modules I've created. Right now this works properly: import
I am trying to include a .js file I created by using this: echo
I am trying to load an xml file that is stored as a resource
We are trying to load a pdf file in web browser using pdfobject javascript
I'm running jquery from a file. And I'm trying to load a svg file

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.