SQL Loader and Floating Point Numbers

Hi
I have a problem loading floating point numbers using SQL Loader. If the number has more than 8 significant digits SQL Loader rounds the number i.e. 1100000.69 becomes 1100000.7. The CTL file looks as follows
LOAD DATA
INFILE '../data/test.csv' "str X'0A'"
BADFILE '../bad/test.bad'
APPEND
INTO TABLE test
FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"'
Amount CHAR
and the data file as follows
"100.15 "
"100100.57 "
"1100000.69 "
"-2000000.33"
"-100000.43 "
the table defined as follows
CREATE TABLE test
Amount number(15,4)
) TABLESPACE NNUT050M1;
after loading a select returns the following
100.15
100100.57
1100000.7
-2000000
-100000.4
Thanks in advance
Russell

Actually if you format the field to display as (say) 999,999,999.99, you will see the correct numbers loaded via SQL Loader.
null

Similar Messages

  • MIDP and floating-point numbers

    Hiya,
    I need to use floating numbers in a few occasions in a MIDP app that I'm programming at the moment. Whenever I do so though I get a nervous-breaking error at the pre-verification stage of the build. I am working with Wireless Toolkit 2.0 and the rror I get is:
    Building "MyMIDlet"
    Error preverifying class <ClassName>
    ERROR: floating-point constants should not appear
    com.sun.kvem.ktools.ExecutionException: Preverifier returned 1
    Build failedI get this error whenever I use a floating-point varible or even whenever I compare something to a floating-point value.
    It's got me really puzzled and I can't think of any way around the problem. Any help would be very much appreciated...
    Thanks!

    also WTK 2.1 (and CLDC 1.1I think ) does support FP. You think right, CLDC 1.1, that's when they added the floats (in theory a device could be MIDP 1.0 on top of CLDC 1.1, and it would also have floats). There's only one CLDC 1.1 device I've heard of: Nokia 6320.
    shmoove

  • Precision loss - conversions between exact values and floating point values

    Hi!
    I read this in your SQL Reference manual, but I don't quite get it.
    Conversions between exact numeric values (TT_TINYINT, TT_SMALLINT, TT_INTEGER, TT_BIGINT, NUMBER) and floating-point values (BINARY_FLOAT, BINARY_DOUBLE) can be inexact because the exact numeric values use decimal precision whereas the floating-point numbers use binary precision.
    Could you please give two examples: one where a TT_TINYINT is converted to a BINARY_DOUBLE and one when a TT_BIGINT is converted into a DOUBLE, both cases give examples on lost precision? This would be very helpful.
    Thanks!
    Sune

    chokpa wrote:
    Public Example (float... values){}
    new Example (1, 1e2, 3.0, 4.754);It accepts it if I just use 1,2,3,4 as the values being passed in, but doesn't like it if I use actual float values.Those are double literals, try
    new Example (1f, 1e2f, 3.0f, 4.754f);

  • Separator for floating point numbers

    Hello,
    I work with oracle 9 and have a problem with the entry of floating point numbers.
    The separator for floating point numbers in my data is a point (5.60).
    The pre-setting of oracle is a comma (5,60).
    By inserting I get the error message:
    01722. 00000 - "invalid number"
    How can i change this setting
    Thanks for Help
    F.

    Hi,
    I'm not sure if I understood your problem, however the NLS_NUMERIC_CHARACTERS variable specifies the characters to use as the group separator and decimal character.
    SQL> create table t1 (val number);
    Table created.
    SQL> select * from nls_session_parameters;
    PARAMETER                      VALUE
    NLS_LANGUAGE                   AMERICAN
    NLS_TERRITORY                  BRAZIL
    NLS_CURRENCY                   R$
    NLS_ISO_CURRENCY               BRAZIL
    NLS_NUMERIC_CHARACTERS ,.
    NLS_CALENDAR                   GREGORIAN
    NLS_DATE_FORMAT                DD/MM/YYYY
    NLS_DATE_LANGUAGE              AMERICAN
    NLS_SORT                       BINARY
    NLS_TIME_FORMAT                HH24:MI:SSXFF
    NLS_TIMESTAMP_FORMAT           DD/MM/RR HH24:MI:SSXFF
    NLS_TIME_TZ_FORMAT             HH24:MI:SSXFF TZR
    NLS_TIMESTAMP_TZ_FORMAT        DD/MM/RR HH24:MI:SSXFF TZR
    NLS_DUAL_CURRENCY              Cr$
    NLS_COMP                       BINARY
    NLS_LENGTH_SEMANTICS           BYTE
    NLS_NCHAR_CONV_EXCP            FALSE
    17 rows selected.
    SQL> insert into t1 values (1.50);
    1 row created.
    SQL> select * from t1;
           VAL
           1,5
    SQL> alter session set nls_numeric_characters='.,';
    Session altered.
    SQL> select * from t1;
           VAL
           1.5Cheers
    Legatti

  • How to gather a set of floating point numbers from a web page form?

    I am pretty new to Java and I am working on a project to apply Benfords law to find the probability of digits submitted by the user. My first step is to gather set of floating point numbers from a web page. How do I go about doing this? Any suggestion or a proper site where I can learn this stuff will be highly appreciated.

    I am using NetBeans IDE 5.5.1 and for this project. I have realized that the first question was not well phrased.
    I created a web project with 2 jsp files and a class file in it. When my jsp file runs I ask the user to enter a number for finding the probablility based on Benfords law.
    This is what I got so far:
    This is input.jsp
    <h1></h1>
    Please enter a number to be checked
    <form action="result.jsp" method="post">
    <input type="number" name="number" >
    <input type="submit" value="Check number">
    </form>
    </body>
    </html>
    This is result.jsp
    String number=request.getParameter("number");

  • OS X Mavericks Contacts phone numbers shown as Floating point numbers

    After installing Mavericks on MBP, I notice that some phone numbers in contacts are shown as floating point numbers, and are unreadable. I am guessing that these are numbers which were proceeded by "+" previously.
    An example is 4.9161E+12, which is for a German contact, and the number would be +49 161...
    I can't see any way to change the format, and the floating point display is useless, as the last digits are lost.
    Would appreciate any advice on the matter.
    Many thanks,
    Michael.

    Music and pics are one way sync - computer to iphone. The iphone is not a storage device.
    Only itunes purchased music can be transfered. With iphone attached to itunes, click file>transfer purchases.
    Pics are optimized for viewing on iphone, reducing the quality of the pic on the iphone. Only pics taken with iphone and in the Camera Roll can be imported from iphone. This is done as with any other digital camera. You can e-mail the other pics to yourself one at a time. They will not be of the original quality though.
    You really should back up your info/pics/music as hard drives can and do fail.

  • Serial Communicat​ion(CAN) of Floating Point Numbers

    Hi,
    I have ran into a situation were I need to use floating point numbers(IEEE Floating Standard) when communicating.   How can I send and recieve floating point numbers?  What converstions need to be made?  Is there a good resource on this?
    Thanks,
    Ken

    Hi K.,
    in automotive a lot of fractional values are exchanged via CAN communication, but still the CAN protocol is based on using integer numbers (of variable bit size)…
    We are thinking we need to use single SGL floats ... that require a higher resoultion and precision
    What is the needed resolution and "precision"? SGL transports 23 bits of mantissa: you can easily pack them into an I32 value!
    Lets make an example:
    I have a signal with a value range of 100…1000 and a resolution of 0.125. To send this over CAN I need to use 13 bits and scale the value with a gain of 0.125 and an offset of 100. Values will be send in an integer representation:
    msgdata value
    0 100
    500 162.5
    501 162.625
    1000 225
    5000 725
    7200 1000
     The formula to translate msgdata to value is easy: value := msgdata*gain+offset.
    Another example: the car I test at the moment sends it's current speed as 16 bit integer value with a range of 0…65532. The gain is 0.01 so speed translates to 0.00…655.32 km/h. The values 65533-65535 have special meanings to indicate errors…
    So again: What is your needed resolution and data range?
    Another option: send the SGL as it is: just 4 bytes. Receive those 4 bytes on your PC as I32/U32 and typecast them to SGL…
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • How does Java store floating point numbers?

    Hello
    I'm writing a paper about floating point numbers in which I compare an IEEE-754 compatible language [c] with Java. I read that Java can do a conversion decimal->binary->decimal and retain the same value whereas c can't. I found several documents discussing the pros and cons of that but I can't find any information about how it is implemented.
    I hope someone can explain it to me, or post a link to a site explaining it.
    Cheers
    Huttu

    So it is a myth.
    I still ask because I observed a oddity: When I store 1.4 in c and printf( %2.20f\n",a); it I get 1.39999999999999991118. If I do the same in Java with System.out.printf( %2.20f\n",a); I get 1.4. If I multiply the variable with itself I get 1.95999999999999970000:
    double a=1.4;
    a=a*a;
    System.out.printf( %2.20f\n",a);
    {code}
    Does this happen because of the rounding in Java?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • [Solved] Bash and Floating point arithmetic

    I didn't realize how troublesome floating point numbers can be until now.
    What I want to do should be simple I dare say:
    properRounding( ( currentTime - downloadTime ) / ( dueTime - downloadTime ) * 100 )
    however best I've been able to achieve so far is this:
    echo "($currentTime-$downloadTime)/($dueTime-$downloadTime)*100" | bc -l
    Which prints the correct floating point value.
    I've tried to put the result in a variable, but I must be doing it wrong as I get the most peculiar error. I can live without it, but it would make life easier.
    As for the rounding, that is a must. I've read that if you remove the -l param from bc, then it will round, but in my case something goes wrong as I just get the value 0 in return and besides, concluded after a simple test, bc always rounds down as in integer division, which I can not use.
    So of course I'll continue reading and hopefully someday arrive at a solution, but I would very much appreciate if someone could lend me a hand.
    This after all is not just a learning experience, I'm trying to create something useful.
    Best regards.
    edit:
    nb:
    all variables are integers.
    Last edited by zacariaz (2012-09-09 14:50:18)

    Just for the fun of it, here's my progress thus far... Well, there really isn't much more to do. The rest is a conky thing.
    #!/bin/bash
    # Variables from unitinfo.txt - date as unix timestamps.
    dueTime="$(date +%s -d "$(grep 'Due time: ' ~/unitinfo.txt | cut -c11-)")"
    if [ "$1" = "end" ]
    then echo $dueTime
    fi
    downloadTime="$(date +%s -d "$(grep 'Download time: ' ~/unitinfo.txt | cut -c16-)")"
    if [ "$1" = "start" ]
    then echo $downloadTime
    fi
    progress="$(grep 'Progress: ' ~/unitinfo.txt | cut -c11-12 | sed 's/ *$//')"
    if [ "$1" = "prog1" ]
    then echo $progress
    fi
    # The rest
    #progress valued 0-1 for use with conky proress bars
    progress2=$( echo 2k $progress 100 / f | dc )
    if [ "$1" = "prog2" ]
    then echo $progress2
    fi
    # Current time - unix timestamp.
    currentTime="$(date +%s)"
    # Remaining time - unix timestamp
    remainingTime=$(( dueTime-$currentTime ))
    if [ "$1" = "remain" ]
    then echo $remainingTime
    fi
    # Elapsed time - unix timestamp
    elapsedTime=$(( currentTime-downloadTime ))
    if [ "$1" = "elap1" ]
    then echo $elapsedTime
    fi
    # Total amount of time available - unix timestamp
    totalTime=$(( dueTime-downloadTime ))
    if [ "$1" = "total" ]
    then echo $totalTime
    fi
    # How much time has elapsed in percent
    progress3="$(echo 3k $elapsedTime $totalTime / 100 \* 0k 0.5 + 1 / f | dc)"
    if [ "$1" = "elap2" ]
    then echo $progress3
    fi
    # Like the above bur 0-1
    progress4=$( echo 2k $progress3 100 / f | dc )
    if [ "$1" = "elap3" ]
    then echo $progress4
    fi
    # In percent, expected completion vs $dueTime - less than 100 is better.
    expectedCompletion="$( echo 3k $elapsedTime 10000 \* $progress / $totalTime / 0k 0.5 + 1 / f | dc )"
    if [ "$1" = "exp1" ]
    then echo $expectedCompletion
    fi
    # Same as above, but unix timestamp
    expectedCompletion2=$(( downloadTime+(expectedCompletion*totalTime/100) ))
    if [ "$1" = "exp2" ]
    then echo $expectedCompletion2
    fi
    #efficiency
    if [ "$1" = "ef1" ]; then
    if [ $progress -lt $progress3 ]
    then echo "you're behind schedule."
    elif [ $progress -eq $progress3 ]
    then echo "You're right on schedule."
    else
    echo "You're ahead of schedule."
    fi
    fi
    if [ "$1" = "ef2" ]; then
    if [ $expectedCompletion -gt 100 ]
    then echo "You're not going to make it!"
    else
    echo "You're going to make it!"
    fi
    fi

  • Single Precision Floating Point Numbers to Bytes

    Ok here is some code that i have written w hile back with some help from the support staff. It is designed to take in precision floating point numbers that are stored as 4 bytes and convert then to a decimal value. It works off of a udp input string and then also reformats the string. I have the ability to look at up to 4000 parameters from this one udp string. But now what i want to do is do the opposite of what i have written, and also perhaps get rid of the matlab i used in it as well. What i would like to be able to do is input a decimal value and then have it converted in to the 4 byte groupings that make up this decimal nd then have it inputed back in to a single long string witht hat grouping of bytes in the right order. A better explanation of what was done can be found on this website
    http://www.jefflewis.net/XPlaneUDP_8.html
    as the original code followed the "Single Precision Floating Point Numbers and Bytes" example on that site but what i want to do is "Going from Single Precision Floating Point Numbers to Bytes". The site also explains the udp string that is being represented. Also attached is the original code that i am trying to simply reverse.
    Attachments:
    x-plane_udp_master.vi ‏34 KB

    Perhaps what you are doing is an exercise in the programming of the math conversion of the bytes.
    But if you are just interested in getting the conversion done, why not use the typecast function?
    If the bytes happen to be in the wrong order for wherever you need to send the string, then you can use string functions to rearrange them.
    Message Edited by Ravens Fan on 10-02-2007 08:50 PM
    Attachments:
    Example_BD.png ‏3 KB

  • Floating point numbers into XML file

    Hi,
    I am a learner in Labview and I am using Labview 8.5 version.
    when I use FlattentoXML component to convert floating point numbers ( having more than 5 decimal points) into XML, the output contains alway 5 decimal points.
    But, I want exact decimal number to be displayed as XML. i.e 0.263746 should not be displayed as 0.26375 in XML.
    Do you have any suggestions ?
    Attachments:
    Float_to_XML.vi ‏7 KB

    I tested it and could not see your problem in Labview 2009. So it is perhaps a bug in your Labview version. You can use this VI as a workaround.
    Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
    (Sorry no Labview "brag list" so far)
    Attachments:
    Float_to_XML[2].vi ‏8 KB

  • Floating-point numbers: min value

    Hi,
    the number wrapper classes each define a MAX_VALUE and a MIN_VALUE constant. While the MIN_VALUE of non-floating point numbers are negative numbers, the MIN_VALUE of the floating point numbers are the smallest postive numbers.
    From the Javadoc:
    Float:
    MAX_VALUE:
    A constant holding the largest positive finite value of type float, (2-2-23)�2127. It is equal to the hexadecimal floating-point literal 0x1.fffffeP+127f and also equal to Float.intBitsToFloat(0x7f7fffff).
    MIN_VALUE:
    A constant holding the smallest positive nonzero value of type float, 2-149. It is equal to the hexadecimal floating-point literal 0x0.000002P-126f and also equal to Float.intBitsToFloat(0x1).
    MAX_VALUE:
    A constant holding the largest positive finite value of type double, (2-2-52)�21023. It is equal to the hexadecimal floating-point literal 0x1.fffffffffffffP+1023 and also equal to Double.longBitsToDouble(0x7fefffffffffffffL).
    MIN_VALUE:
    A constant holding the smallest positive nonzero value of type double, 2-1074. It is equal to the hexadecimal floating-point literal 0x0.0000000000001P-1022 and also equal to Double.longBitsToDouble(0x1L).
    Can someone tell me the MAX_NEGATIVE_VALUE (the finite negative value with the largest absolute value) and the MIN_NEGATIVE_VALUE (the negative value with the smallest nonzero absolute value) of float and double (using the xxxBitsToXxx-methods)?
    Thanks!
    -Puce

    The IEEE754 format is symmetric with respect to the sign, so -MAX_VALUE
    and -MIN_VALUE are the values you're looking for.
    kind regards,
    Jos

  • IEEE 754 standards for representing floating point numbers

    HI All..
    Most of us are not awared how the actually Floating point numbers are represented . IEEE have set standards as how should we represent floating point numbers.
    I am giving u the link with which u can know how actually these are represented.
    http://en.wikipedia.org/wiki/IEEE_754
    If u have any doubts u can always reach me.
    Bye
    Happy learning
    [email protected]

    A noble but misguided attempt at dispelling the recurring problems the programmers have over and over again. There have been repeated posts to links about the IEEE standard, to little or no avail. The newbies who run into the problems will continue to do so, without regard to yet another post about it here.

  • SQL Loader and Insert Into Performance Difference

    Hello All,
    Im in a situation to measure performance difference between SQL Loader and Insert into. Say there 10000 records in a flat file and I want to load it into a staging table.
    I know that if I use PL/SQL UTL_FILE to do this job performance will degrade(dont ask me why im going for UTL_FILE instead of SQL Loader). But I dont know how much. Can anybody tell me the performance difference in % (like 20% will decrease) in case of 10000 records.
    Thanks,
    Kannan.

    Kannan B wrote:
    Do not confuse the topic, as I told im not going to use External tables. This post is to speak the performance difference between SQL Loader and Simple Insert Statement.I don't think people are confusing the topic.
    External tables are a superior means of reading a file as it doesn't require any command line calls or external control files to be set up. All that is needed is a single external table definition created in a similar way to creating any other table (just with the additional external table information obviously). It also eliminates the need to have a 'staging' table on the database to load the data into as the data can just be queried as needed directly from the file, and if the file changes, so does the data seen through the external table automatically without the need to re-run any SQL*Loader process again.
    Who told you not to use External Tables? Do they know what they are talking about? Can they give a valid reason why external tables are not to be used?
    IMO, if you're considering SQL*Loader, you should be considering External tables as a better alternative.

  • SQL *Loader and External Table

    Hi,
    Can anyone tell me the difference between SQL* Loader and External table?
    What are the conditions under we can use SQL * Loader and External Table.
    Thanx

    External tables are accessible from SQL, which generally simplifies life if the data files are physically located on the database server since you don't have to coordinate a call to an external SQL*Loader script with other PL/SQL processing. Under the covers, external tables are normally just invoking SQL*Loader.
    SQL*Loader is more appropriate if the data files are on a different server or if it is easier to call an executable rather than calling PL/SQL (i.e. if you have a batch file that runs on a server other than the database server that wants to FTP a data file from a FTP server and then load the data into Oracle).
    Justin

Maybe you are looking for

  • GregorianCalender, I'm at my wits' end

    I am working with GregorianCalender class in order to process the dates around my application, but i am finding to many problems. When i work, for example, with the date 01.02.2005, the Year property belongin to the calendar object is set to 2005 but

  • Outputting sine wave to motor -- While loop placement?

    I'm having trouble creating a basic Labview program to drive a motor with a sine wave. I'd like to output one sine wave at a time to my motor and look at the response to eventually get a Bode plot. I'm using the Sine waveform VI and I've got a PXI-73

  • Clicking on login image goes straight to terminal...

    Hello, So I finally rebooted my computer after the latest update. Everything went fine until I clicked on my user icon to log in... Aqua quit and went straight to a terminal log in prompt. I can log on just fine, but... It doesn't matter which user a

  • Incomplete BPR

    I want to define my business processes in SOLAR01. I have an implementation project with the logical component to a ERP 4.6C system attached. In SOLAR01 I go to the "Business Scenario" and then the "structure" tab. I use the field help to look for th

  • Premiere Pro CS4 Error 1624 on install

    I have adobe creative suite 4 - Production Premium. I have been able to install photoshop and some of the other programs just fine. Whenever I try to install Premiere Pro, I get the same error: Error Error 1624 Error 1624. Error applying transforms.