Number Precision- JExcel

Dear friends,
I am using JExcel API to parse an Excel file. i would like to know how to retrieve a number value in a formula cell rounded off to its nearest integer. I don't want to use any ceiling/floor function but would like to use the functionalities provided with JExcel.
Kindly help.
Subhash

lxl.NumberCell.getNumberFormat() gives you whatever format Excel was using. If that isn't the format you need, I don't see anything in JExcel that will do it.

Similar Messages

  • PL/SQL: numeric or value error: number precision too large

    hi ,
    i am running my script and getting this error. i created a object and and make table type on this with fraction of number(2,2). and in my script i am calling a standard API which have hour in number only .i am also using a custome table also which also having number(2,2). so plz help me to resoulve thsi error.
    description below:
    DECLARE
    l_Return_Status VARCHAR2 (30):=NULL;
    l_Msg_Count NUMBER :=0;
    l_Msg_Data VARCHAR2 (2000) := NULL;
    v_Sape_Sco_info_Tbl SAPE_SCO_INFO_TBL;
    v_Sape_Sco_info_rec SAPE_SCO_INFO_REC;
    p_assignment number:=165316; -----165688;
    p_project_id number:=74538; -----81993;
    sco_id number:=10371;
    BEGIN
    v_Sape_Sco_info_Tbl := SAPE_SCO_INFO_TBL();
    v_Sape_Sco_info_rec := SAPE_SCO_INFO_REC(p_assignment,p_project_id,sco_id,'15-Oct-2009','31-Oct-2009',15.00,'17-Oct-2009','20-Oct-2009','ADD_EXISTING_RESOURCES',02.50,NULL,'Y',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
    v_Sape_Sco_info_Tbl.EXTEND;
    v_Sape_Sco_info_Tbl(1) := v_Sape_Sco_info_rec;
    SAPE_UPDATE_SCO_DETAILS_PKG.SCO_ROLE_INCREASE(
    x_project_id =>p_project_id,
    x_Assignment_Id =>p_assignment,
    l_Sape_Sco_info_Tbl => v_Sape_Sco_info_Tbl,
    x_called_function =>'ADD_EXISTING_RESOURCES',
    x_Return_Status =>l_Return_Status,
    x_Msg_Count =>l_Msg_Count,
    x_Msg_Data =>l_Msg_Data
    dbms_output.put_line('second Procedure executed sucessesfuly');
    dbms_output.put_line('l_Return_Status '||l_Return_Status||' l_Msg_Count '||l_Msg_Count||'l_Msg_Data');
    dbms_output.put_line('value'||' '||v_Sape_Sco_info_Tbl(1).Assignment_Id);
    dbms_output.put_line('completed');
    EXCEPTION
    WHEN OTHERS THEN
    dbms_output.put_line(sqlerrm(sqlcode));
    END;
    error :PL/SQL: numeric or value error: number precision too large
    CREATE OR REPLACE TYPE SAPE_PA.SAPE_SCO_INFO_TBL IS TABLE OF SAPE_SCO_INFO_REC;
    Prompt OBJECT TYPE SAPE_PA.SAPE_SCO_INFO_REC
    DROP TYPE SAPE_PA.SAPE_SCO_INFO_REC;
    CREATE OR REPLACE TYPE SAPE_PA.SAPE_SCO_INFO_REC AS OBJECT
    ( Assignment_Id NUMBER,
    project_id Number,
    sco_id Number,
    Role_START_DATE DATE,
    Role_END_DATE DATE,
    avg_hrs_per_day NUMBER(2,2),
    sco_role_start_date DATE,
    sco_role_end_date DATE,
    sco_role_mode VARCHAR2(250),
    sco_hrs_per_day NUMBER(2,2),
    no_of_copies Number,
    Active_Flag VARCHAR2(10),
    BILLABLE_UPSIDE_INDICATIOR VARCHAR2(5),
    RET_CODE VARCHAR2(5),
    ERROR_MSG VARCHAR2(255),
    ATTRIBUTE1 VARCHAR2(240),
    ATTRIBUTE2 VARCHAR2(240),
    ATTRIBUTE3 VARCHAR2(240),
    ATTRIBUTE4 VARCHAR2(240),
    NATTRIBUTE1 NUMBER,
    NATTRIBUTE2 NUMBER
    CREATE TABLE SAPE_PA.SAPE_SCO_STAFFING_MAPPINGS
    (     PROJECT_ID NUMBER,
              SCO_ID NUMBER,
              ASSIGNMENT_ID NUMBER PRIMARY KEY,
              SCO_ROLE_START_DATE DATE,
              SCO_ROLE_END_DATE DATE,
              SCO_ROLE_HOURS NUMBER(2,2),
              SCO_MODE VARCHAR2(80),
              ACTIVE_FLAG VARCHAR2(5),
              LAST_UPDATE_DATE DATE,
              LAST_UPDATED_BY NUMBER(15,0),
              CREATION_DATE DATE,
              CREATED_BY NUMBER(15,0),
              LAST_UPDATE_LOGIN NUMBER(15,0),
              ATTRIBUTE1 VARCHAR2(240),
              ATTRIBUTE2 VARCHAR2(240),
              ATTRIBUTE3 VARCHAR2(240),
              ATTRIBUTE4 VARCHAR2(240),
              NATTRIBUTE1 NUMBER,
              NATTRIBUTE2 NUMBER     
              )

    The problem here is with avg_hrs_per_day NUMBER(2,2)+ of SAPE_SCO_INFO_REC object.
    user12226862 wrote:
    CREATE OR REPLACE TYPE SAPE_PA.SAPE_SCO_INFO_REC AS OBJECT
    ( Assignment_Id NUMBER,
    project_id Number,
    sco_id Number,
    Role_START_DATE DATE,
    Role_END_DATE DATE,
    avg_hrs_per_day NUMBER(2,2),
    sco_role_start_date DATE,And while assigning the value it is:
    user12226862 wrote:
    v_Sape_Sco_info_rec := SAPE_SCO_INFO_REC(p_assignment,p_project_id,sco_id,'15-Oct-2009','31-
    Oct-2009',15.00,'17-Oct-2009','20-
    Oct-2009','ADD_EXISTING_RESOURCES',02.50,NULL,'Y',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);Note that number(2,2) means maximum total of digits in that case is 2 (including scale), not 4.
    E.g.
    SQL>  declare
      2       x number(2,2);
      3     begin
      4       x := 02.50;
      5     end;
      6    /
    declare
    ERROR at line 1:
    ORA-06502: PL/SQL: numeric or value error: number precision too large
    ORA-06512: at line 4However, this works:
    SQL>  declare
      2       x number(2,2);
      3     begin
      4       x := .50;
      5     end;
      6    /
    PL/SQL procedure successfully completed.Cheers,
    AA

  • Number precision too large

    THE FOLLOWING SIMPLE CODE IS GIVING ERROR even though i have given the definition (2,3) which is larger than the length of value 3.14 ?
    declare
    pi constant number(2,3):=3.14;
    r number(5) ;
    a number(5);
    begin
    r:=2;
    a:=pi*power(r,2);
    dbms_output.put_line('area is '||a);
    insert into areas values(r,a);
    end;
    ERROR at line 1:
    ORA-06502: PL/SQL: numeric or value error: number precision too large
    ORA-06512: at line 2

    pi constant number(2,3):=3.14;Perhaps you meant NUMBER(3,2).
    SQL> declare
      2     pi constant number(3,2):=3.14;
      3  begin
      4     dbms_output.put_line(pi);
      5  end;
      6  /
    3.14
    PL/SQL procedure successfully completed.
    SQL> declare
      2     pi constant number(3,2):=3.1415926;
      3  begin
      4     dbms_output.put_line(pi);
      5  end;
      6  /
    3.14

  • ERROR:number precision too large (WWV-16016)

    Hi!
    As I try to insert values into form items an error accurs:
    ORA-06502: PL/SQL: numeric or value error: number precision too
    large (WWV-16016)
    P.S.-One form item inserts values into database table where
    column is VARCHAR2, lenght 2000...
    How can I fix this error?Thank you in advance!

    Table Structure:
    ID NUMBER (5,0) , DATE_T1 DATE, ID_PROFESOR NUMBER(5,0), SUBJECT
    VARCHAR2(50), MESSAGE VARCHAR2(2000).
    The error accurs for example if I try to insert:
    ID=1,DATE_T1=6.6.2001, ID_PROFESOR=3, SUBJECT="New uniforms",
    MESSAGE="bla,bla,bla..."
    I'm using Oracle portal version 8.1.2.
    I hope, this will help you!

  • ORA-06502: PL/SQL: numeric or value error: number precision too large

    I am getting this error when my procedure is being invoked. I've checked if a calculation is attemting to assign an integer to a column that has a smaller data type...e.g 99 being inserted into NUMBER(2)....but this all seems fine...
    any ideas where I should check?
    thanks!

    >Is there a way to tell which column is throwing this error
    As suggested by Guido it appears to be related to your variables, not the table;
    SQL> create table t (col1 number(1))
    Table created.
    SQL> begin
       insert into t values (11);
    end;
    ORA-01438: value larger than specified precision allowed for this column
    ORA-06512: at line 2
    SQL> declare
       n  number(1);
       n2 number(2) :=11;
    begin
       n:= n2;
    end;
    ORA-06502: PL/SQL: numeric or value error: number precision too large
    ORA-06512: at line 5The error message should tell you the line of code that is causing the problem, ie;
    ORA-06512: at line 5A quick way to show the values is to display them using dbms_output.put_line inline or in the exception handler.

  • Error: PLS-00216: NUMBER precision constraint must be in range (1 .. 38)

    While compiling one package i am getting the error>
    PLS-00216: NUMBER precision constraint must be in range (1 .. 38)
    The declaration is:
    lServerImportRetVal          number(40);
    Database is Oracle10gdb.
    Do i resize the variable to 38... is that advisable.?

    last option is to change... Your only option is to change: Oracle supports a maximum of 38 digits.
    (Why do you think you need 40 digits? What astronomical number are we talking about?)

  • ORA-06502: PL/SQL: numeric or value error:. number precision too large, ORA-06502: PL/SQL: numeric or value error:. number precision too large

    I have hit with above error and the code did run successfully before the minor change in the portion I have bolded. Appreciate your comment & help.
    Attached with the code:
    CREATE TABLE RPT1120B_CHANNEL_new
    (SUBSCRIBER_NO NUMBER (9),
    FP_CHANNEL VARCHAR2(255),
    FP_DATE DATE,
    FP_DYNASTY CHAR(1),
    FP_MOVIE CHAR(1),
    FP_FUN CHAR(1),
    FP_LEARNING CHAR(1),
    FP_NEWS CHAR(1),
    FP_SPORTS CHAR(1),
    FP_VARIETY CHAR(1),
    FP_EMPEROR CHAR(1),
    FP_SX1 CHAR(1),
    FP_CEL CHAR(1),
    LP_CHANNEL VARCHAR2(255),
    LP_DATE DATE,
    LP_DYNASTY CHAR(1),
    LP_MOVIE CHAR(1),
    LP_FUN CHAR(1),
    LP_LEARNING CHAR(1),
    LP_NEWS CHAR(1),
    LP_SPORTS CHAR(1),
    LP_VARIETY CHAR(1),
    LP_EMPEROR CHAR(1),
    LP_SX1 CHAR(1),
    LP_CEL CHAR(1));
    --truncate table RPT1120B_CHANNEL;
    create or replace PROCEDURE sp_rpt1120b_new
    AS
    FP_CHANNEL VARCHAR2(255);
    FP_DATE DATE;
    LP_CHANNEL VARCHAR2(255);
    LP_DATE DATE;
    REC_COUNT NUMBER(3);
    TYPE REC_SA IS RECORD
    (AGREEMENT_NO NUMBER (9));
    TYPE REC_CHANNEL IS RECORD
    (CHANNEL VARCHAR2(3),
    AGREEMENT_NO NUMBER (9));
    BEGIN
    FOR REC_SA IN (SELECT DISTINCT SUBSCRIBER_NO FROM RPT1120B_T1_new) LOOP
         FP_CHANNEL := '';
         LP_CHANNEL := '';
         REC_COUNT := 0;
         FP_DATE := '';
         LP_DATE := '';
         FOR REC_CHANNEL IN      (SELECT distinct decode(SOC,
                                       29990,'N',
                                       29991,'V',
                                       29993,'M',
                                       29988,'F',
                                       29989,'L',
                                       29992,'S',
                                       29994,'D',
                                       29995,'E',
                                       30277,'C',
                                       30293,'C',
                                       30319,'C',
                                       30359,'C',
                                       30276,'X',
                                       30331,'X',
                                       30299,'X',
                                       30380,'X')      
                        AS CHANNEL,SA.EFFECTIVE_DATE as soc_sts_date
                   FROM      SERVICE_AGREEMENT SA
                   WHERE      SA.SOC in (          29990,
                                       29991,
                                       29993,
                                       29988,
                                       29989,
                                       29992,
                                       29994,
                                       29995,
                                       30277,
                                       30293,
                                       30319,
                                       30359,
                                       30276,
                                       30331,
                                       30299,
                                       30380) AND
                        SA.AGREEMENT_NO = REC_SA.SUBSCRIBER_NO AND
                        TRUNC(SA.EFFECTIVE_DATE) <> TRUNC(NVL(SA.EXPIRATION_DATE,SYSDATE)) AND
                        SA.EFFECTIVE_DATE = (SELECT MIN(SA1.EFFECTIVE_DATE) FROM SERVICE_AGREEMENT SA1
                                  WHERE SA1.AGREEMENT_NO = SA.AGREEMENT_NO AND
                                  sa1.soc in (
    29990,
                                       29991,
                                       29993,
                                       29988,
                                       29989,
                                       29992,
                                       29994,
                                       29995,
                                       30277,
                                       30293,
                                       30319,
                                       30359,
                                       30276,
                                       30331,
                                       30299,
                                       30380))
                        order by DECODE(channel,'D',1,'M',2,'E',3,'C',4,'X',5,'F',6,'L',7,'N',8,'S',9,'V',10)) LOOP
                   REC_COUNT := REC_COUNT + 1;
                   if REC_COUNT < 254 then
                        FP_CHANNEL := FP_CHANNEL || REC_CHANNEL.CHANNEL;
                   end if;
                   FP_DATE := REC_CHANNEL.soc_sts_date;
         END LOOP;
         REC_COUNT := 0;
         FOR REC_CHANNEL IN      (SELECT distinct decode(sa.SOC,
                                       29990,'N',
                                       29991,'V',
                                       29993,'M',
                                       29988,'F',
                                       29989,'L',
                                       29992,'S',
                                       29994,'D',
                                       29995,'E',
                                       30277,'C',
                                       30293,'C',
                                       30319,'C',
                                       30359,'C',
                                       30276,'X',
                                       30331,'X',
                                       30299,'X',
                                       30380,'X')     
                        AS CHANNEL,SA.soc_status_date as soc_sts_date
                   FROM      SERVICE_AGREEMENT SA,
                        (SELECT MAX(SA1.soc_status_DATE) as soc_date, agreement_no, soc
                        FROM SERVICE_AGREEMENT SA1
                        WHERE soc in(          29990,
                                       29991,
                                       29993,
                                       29988,
                                       29989,
                                       29992,
                                       29994,
                                       29995,
                                       30277,
                                       30293,
                                       30319,
                                       30359,
                                       30276,
                                       30331,
                                       30299,
                                       30380)
                        GROUP BY agreement_no, soc) sa1
                   WHERE      SA.SOC in (      29990,
                                       29991,
                                       29993,
                                       29988,
                                       29989,
                                       29992,
                                       29994,
                                       29995,
                                       30277,
                                       30293,
                                       30319,
                                       30359,
                                       30276,
                                       30331,
                                       30299,
                                       30380) AND
                        SA.soc_status_date = sa1.soc_date AND
                        TRUNC(SA.SOC_STATUS_DATE) <> TRUNC(NVL(SA.EXPIRATION_DATE,SYSDATE)) AND
                        SA.SOC_STATUS = (SELECT MIN(SA2.SOC_STATUS) FROM SERVICE_AGREEMENT SA2
                                  WHERE SA2.AGREEMENT_NO = SA.AGREEMENT_NO AND sa2.soc = sa.soc
                                  and SA2.soc_status_date = SA.soc_status_date)
                        order by DECODE(channel,'D',1,'M',2,'E',3,'C',4,'X',5,'F',6,'L',7,'N',8,'S',9,'V',10)) LOOP
                   REC_COUNT := REC_COUNT + 1;
                   if REC_COUNT < 254 then               
                        LP_CHANNEL := LP_CHANNEL || REC_CHANNEL.CHANNEL;
                   end if;
                   LP_DATE := REC_CHANNEL.soc_sts_date;
         END LOOP;
         INSERT INTO RPT1120B_CHANNEL_new values
              (REC_SA.SUBSCRIBER_NO,
              substr(FP_CHANNEL,1 essageID=1196758, I have hit with above error and the code did run successfully before the minor change in the portion I have bolded. Appreciate your comment & help.
    Attached with the code:
    CREATE TABLE RPT1120B_CHANNEL_new
    (SUBSCRIBER_NO NUMBER (9),
    FP_CHANNEL VARCHAR2(255),
    FP_DATE DATE,
    FP_DYNASTY CHAR(1),
    FP_MOVIE CHAR(1),
    FP_FUN CHAR(1),
    FP_LEARNING CHAR(1),
    FP_NEWS CHAR(1),
    FP_SPORTS CHAR(1),
    FP_VARIETY CHAR(1),
    FP_EMPEROR CHAR(1),
    FP_SX1 CHAR(1),
    FP_CEL CHAR(1),
    LP_CHANNEL VARCHAR2(255),
    LP_DATE DATE,
    LP_DYNASTY CHAR(1),
    LP_MOVIE CHAR(1),
    LP_FUN CHAR(1),
    LP_LEARNING CHAR(1),
    LP_NEWS CHAR(1),
    LP_SPORTS CHAR(1),
    LP_VARIETY CHAR(1),
    LP_EMPEROR CHAR(1),
    LP_SX1 CHAR(1),
    LP_CEL CHAR(1));
    --truncate table RPT1120B_CHANNEL;
    create or replace PROCEDURE sp_rpt1120b_new
    AS
    FP_CHANNEL VARCHAR2(255);
    FP_DATE DATE;
    LP_CHANNEL VARCHAR2(255);
    LP_DATE DATE;
    REC_COUNT NUMBER(3);
    TYPE REC_SA IS RECORD
    (AGREEMENT_NO NUMBER (9));
    TYPE REC_CHANNEL IS RECORD
    (CHANNEL VARCHAR2(3),
    AGREEMENT_NO NUMBER (9));
    BEGIN
    FOR REC_SA IN (SELECT DISTINCT SUBSCRIBER_NO FROM RPT1120B_T1_new) LOOP
         FP_CHANNEL := '';
         LP_CHANNEL := '';
         REC_COUNT := 0;
         FP_DATE := '';
         LP_DATE := '';
         FOR REC_CHANNEL IN      (SELECT distinct decode(SOC,
                                       29990,'N',
                                       29991,'V',
                                       29993,'M',
                                       29988,'F',
                                       29989,'L',
                                       29992,'S',

    The error message has an important hint: "number precision too large"
    Change REC_COUNT's type from NUMBER(3) to NUMBER and see what happens.

  • How to control the number precision???

    Hi guys,
    I have a number 350.00
    I need to make 350.0
    How to do that on LV8.6?
    thanks in advance.

    testas123 wrote:
    However it is very bad that LabVIEW does not have NUMBER precision control (decimal point)!!! shame!
    Well, you can always write your own subVI with a few strokes of the mouse.
    If you are talking about truncation (a data operation) and not formatting (a cosmetic issues), be aware that many nice and round decimal digits cannot be correctly represented in binary, so you might still be slightly off when you would display e.g. 16 decimal digits.
    LabVIEW Champion . Do more with less code and in less time .

  • Number Precision in Materialized View

    Hey,
    I have created several materialized views with multiple fields of data type number. I would like to have those number fields created with max length 5 and precision 0 (no decimal places). I am thinking that each of those database fields will then appear as NUMBER(5,0) in the database, maybe I am wrong on that.
    How can I code that into my select statement for which the materialized is created?
    Thanks

    Todd gives a better suggestion.
    I could be wrong, but I believe views in general pull their datatypes from their base sources. Therefore if you want your materialized view datatypes to be NUMBER(5,0) you will have to alter your base tables as such.
    Otherwise, if you don't care about the datatype just the value, then in the select part of your materialized view you could use substr and possibly instr to get the length of five you desire and convert back to a number.
    Message was edited by:
    splazm

  • Number precision in Clustering rules

    When runing O-Cluster I get rules with many variables (say VarX) showing the following number:
    if ..... VarX>=1.40129546324817E-45 then Cluster equal .....
    I set the preferences with precision =4
    Shouldn´t I get then VRAX>=0 ?
    Tkx
    D

    Todd gives a better suggestion.
    I could be wrong, but I believe views in general pull their datatypes from their base sources. Therefore if you want your materialized view datatypes to be NUMBER(5,0) you will have to alter your base tables as such.
    Otherwise, if you don't care about the datatype just the value, then in the select part of your materialized view you could use substr and possibly instr to get the length of five you desire and convert back to a number.
    Message was edited by:
    splazm

  • Cx_Oracle.NUMBER precision problem ..

    Hi All,
    i understand that floating point numbers are inherently inaccurate, eg:
    0.1 + 0.2 != 0.3
    the problem i'm seeing is that:
    in sqlplus, a query is returning 0.088 from the Oracle db server,
    but cx_Oracle is changing the value to 0.08800000000000001.
    at the interpretor, v = 0.088, retains 0.088...
    (most likely, the precision is maintained upon definition),
    is there a way to set the precision for cx_Oracle.NUMBER ?
    thanks very much in advance!
    sam

    What about using one of these:
    # t.py
    import cx_Oracle
    import decimal
    db = cx_Oracle.connect("cj", "cj", "localhost/orcl")
    cur = db.cursor()
    cur.execute("select volume from goods")
    rows = cur.fetchall()
    print rows
    cur = db.cursor()
    cur.execute("select to_char(volume) from goods")
    rows = cur.fetchall()
    print rows
    print float(rows[0][0])
    def NumbersAsDecimal(cursor, name, defaultType, size, precision, scale):
        if defaultType == cx_Oracle.NUMBER:
            return cursor.var(str, 100, cursor.arraysize, outconverter = decimal.Decimal)
    db.outputtypehandler = NumbersAsDecimal
    cur = db.cursor()
    cur.execute("select volume from goods")
    rows = cur.fetchall()
    print rowsOutput is:
    $ python t.py
    [(0.08800000000000001,)]
    [('.088',)]
    0.088
    [(Decimal('0.088'),)]

  • Difference in number precision

    Hello Everyone
    What is the differnece between the declarations of the two variables
    1) lv_v_var number(8)
    and
    2) lv_v_vvar number.
    I know that 1st case can store numbers upto 8 digits and the 2nd case can store any number of digits.
    But other than this is there any difference between the two like performance issue( whether just number occupies more memory than number (8)). Is it advisable to to substititue
    lv_v_vvar number in place of lv_v_var number(8) everytime whereever required. Or whether it is advisable to substitute upto max digits required for me at that time. (For e.g if i only require digits upto 9 numbers then
    lv_v_var number (9) is enough.
    Thanks

    ms wrote:
    Hello Everyone
    What is the differnece between the declarations of the two variables
    1) lv_v_var number(8)
    and
    2) lv_v_vvar number.
    I know that 1st case can store numbers upto 8 digits and the 2nd case can store any number of digits.Correction. It is not any number of digits but anything upto 38 digits.
    But other than this is there any difference between the two like performance issue( whether just number occupies more memory than number (8)). No. there is not Performance benefit.
    Is it advisable to to substititue
    lv_v_vvar number in place of lv_v_var number(8) everytime whereever required. Or whether it is advisable to substitute upto max digits required for me at that time. (For e.g if i only require digits upto 9 numbers then
    lv_v_var number (9) is enough.Yes, it is business rules dependent. If you know a number field for eg. Age, cannot be a 4 digit (unless you are a super-human, living for centuries altogether) then the age variable should be declared as NUMBER(3). This prevents any entry beyond 999 in the variable and raises an exception.

  • Oracle Number Precision  format

    Hi,
    I have one doubt regarding Oracle Number format .
    If the Number format is (4,2) ,Its accepting total 5 Bytes.
    But if its 16,6 Its accepting 16 Bytes only . Its able to save numbers in 9,6 or 10,5 . Could you please me know Why it is so.
    Regards
    -

    user8873073 wrote:
    Sorry for the Confusion .
    here are the details .
    Say if the field type is 4,2 , It's accepting 12.34 ( total length 5)
    If the field length is 16,6 , From the above scenario , I am expecting to enter a data of length 17 . But Its possible to enter value of length 16 only.
    On trying to save 1234567890.123456 , its rounding off and displaying as 1234567890.12346 (5 missed) in table.Remember numbers are stored in an internal non-human readable format in Oracle. When you select a numeric
    column in your client it has to convert it to a form you can read. The default format for your client is probably
    rounding the result for you.
    Try using a to_char around the numeric column like to_char(col, '9999999999.999999').
    By the way, the '5' isn't missed in your example, it is simply rounding the .123456 bit to .12346 (rounding to 5 decimal places).
    SQL> create table test_number (
      2  num number(16,6)
      3  );
    Table created
    SQL> insert into test_number
      2  values(1234567890.123456);
    1 row inserted
    SQL> select to_char(num,'9999999999.999999')
      2  from test_number;
    TO_CHAR(NUM,'9999999999.999999
    1234567890.123456
    SQL> select to_char(num,'9999999999.99999')
      2  from test_number;
    TO_CHAR(NUM,'9999999999.99999'
    1234567890.12346Notice the difference in the last example.

  • Number Precision lost while inserting

    I have a table with following structure
    Desc dummycol1     number(28,7)
    When I try following query:
    INSERT INTO DUMMY1 VALUES (9999999999999)
    Output is:
    A
    9999999999999.0003200
    This output is taken from a software called PL/SQL Developer.SQLPlus shows the value as "1.0000E+13"
    The result varies with different values and correct for values upto 12 digits number.
    How can a confirm what value is stored in database.And if wrong value is getting inserted what is the reason for it.
    Thanks is advance.

    Then what you send to the database is not what you specified...
    This is not an Oracle issue, but likely on due to NLS settings, local client environment settings, or the the like.
    In SQL*Plus, Oracle 10.2.0.1:
    SQL> create table dummy( col1 number(28,7) );
    Table created.
    SQL> insert into dummy values( 9999999999999 );
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> col col1 format 999999999999999999999990.000000000000000
    SQL> select col1, DUMP(col1) from dummy;
    COL1
    DUMP(COL1)
    9999999999999.000000000000000
    Typ=2 Len=8: 199,10,100,100,100,100,100,100
    SQL>

  • Number Precisions

    Hi,
    I tried to parse a String and store the double/float value in the databse. But for very large numbers(Example 22,4, ie 16 integers digits and 4 decimal digits), the precision is lost. Can somebody suggest a way where I can retain the precision.
    Thanks in advance,
    Srinath K P

    See the classes in java.math - BigInteger and BigDecimal. They allow operation on arbitrary precision numbers.
    Example: what's 12 to the power of 74:import java.math.*;
    public class BigIntegers {
      public static void main(String[] args) {
       BigInteger a = new BigInteger("12");
       BigInteger b = a.pow(74);
       System.out.println(b); }
    }Result:
    72345614109462974751442001673415239440886790091234732113689383539734402998206464
    See the documentation for further details:
    http://java.sun.com/j2se/1.3/docs/api/java/math/package-summary.html

Maybe you are looking for

  • Work on multiple screens

    I was wondering if there was a way I could use my mini display port to my hdtv to browse the web fullscreen but also work with different software on my MacBook Pro screen.

  • IWeb SEO Tool

    Hello. I'm trying to use this software. I need to import my site from this location HD/Users/Max/Sites to be able to use this sw. This folder is NOT updated with the last changes, so the whole operation is not useful. Any idea?

  • Re-name app

    I have an app I downloaded from itunes store and I want to re-name the app. Is this possible on the iphone4?

  • Mismatching no of records b/w CATSDB table and Data Source 0ca_ts_is_1

    Hi Experts, We are extracting the data from Data base table <b>CATSDB</b>.The No of records in the table(SE11) are <b>800</b> with status <b>30</b>, but in RSA3 <b>(0ca_ts_is_1)</b> there are <b>500</b> records only. What could be the causes? Could y

  • Can't use my Adobe Illustrator CS2 with my new Mac Book Pro - is there any way to fix?

    I recently purchased a MacBook Pro only to find out AFTER I made the purchase that I would not be able to use my Illustrator CS2! Do I really have to purchase a complete version of CS5 or is there another way around this? Does anyone know if OSX 10.7