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'),)]

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

  • 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.

  • Billing Number Range problem ( accounting document not generated)

    Hi All,
    I have created some billing types and for them I have assigned some internal number ranges. Now when I create a billing document it is getting saved with the proper number range but no accounting document is getting generated.
    Also when I try to release the invoice I am getting an error which says " *Incorrect doc.no.: 10000009. Select document number between 0090000000 and 0099999999* "
    K I N D L Y     suggest  as U R G E N T.
    Regards,
    Danny.

    Dear,
              Billing Number Range problem ( accounting document not generated) is not an error because when you create billing document then accounting document not generated. Accounting done after posting of that billing document with VFX3 or VF02 T.Code by account department.
               And for second issue you had define number range between 0090000000 and 0099999999 for invoice so thats why it happen.
    Regards,
    Sandip Shaktavat

  • Solution Database - Maximum number of Problems and Solutions

    Hi everyone,
    I´m new at CRM and I was wondering if you could help me sharing your knowledge and experience on this.
    I completed the SAF and solution database configuration , I was wondering if there´s a maximum number of problems when creating problems and solutions on IS01? Also Can I have 2 or more solution data bases (with different problems and solutions) assigned for a business role?
    comments are appreciated
    thanks!

    http://help.sap.com/saphelp_crmhana/helpdata/en/a4/9fa471b41f44828da6ea1490f02e2b/frameset.htm
    What about this?
    Best regards,
    Thomas Wagner

  • 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!

  • Please, I am in a very big problem I designed the project by Adobe director And you test the software on the computers on Windows and works with high quality When I tested the project on Apple Macintosh operating system, Li appeared a number of problems

    Please, I am in a very big problem
    I designed the project by Adobe director
    And you test the software on the computers on Windows and works with high quality
    When I tested the project on Apple Macintosh operating system, Li appeared a number of problems and you dissolve a large part of them
    But I have a problem too big
    The project works on some devices and others show me messages mistakes and why chasm different operating system version
    Apple's Macintosh and these messages
    "biosegnatures" can't be opened becouse it 's from undefined developer "
    others
    shokwave player error
    pleas what can i do

    Welcome to the Support Communities.
    m.raslan wrote:
    I tested the project on Apple Macintosh operating system
    Click on the  menu at top left of your screen, choose About This Mac and, in the panel that appears, note the Version no. in the form 10.n.n. Then update your product list so we can see what version of OS X you're running on the Mac — see this tutorial:
    Update your product list
    m.raslan wrote:
    "biosegnatures" can't be opened becouse it 's from undefined developer "
    This Apple doc may help:
    OS X: About Gatekeeper
    m.raslan wrote:
    shokwave player error
    Is Shockwave Player installed?...
    http://www.adobe.com/shockwave/welcome/
    ...If not, get it here:
    http://get.adobe.com/shockwave/

  • 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 .

  • Ipad mini ios7.3. Itunes shows 6.1.3. I've got a number of problems. Is this the Phobos problem I have?

    Ipad mini ios7.3. Itunes shows 6.1.3. I've got a number of problems. Is this the Phobos problem I have?

    Update iTune on your computer (tap image to enlarge)

  • Precision problems numeric(30,10) to number

    Hi,
    We are running 11g Enterprise Edition and are evaluation the Database Gateway for ODBC. The database is running on Windows 2008 R2.
    The Gateway has been successfully setup against our MS SQL Server running on Windows 2008 as well.
    Almost everything has been working perfectly (selecting from tables/views, executing stored procedures) but we have not been able to solve the case of returning numeric (precision, scale) data type back to Oracle.
    F.x. 367.700 is 367 once selected in Oracle.
    The documentation states that SQL_NUMERIC(p[,s]) should be converted to NUMBER(p[,s]) but no matter what we always get lose the scale.
    We added the parameter HS_FDS_REPORT_REAL_AS_DOUBLE = TRUE as well to the ini file.
    Any ideas?

    The definition of the column is numeric (30,10).
    We are using the Gateway with OLE DB.
    The init<sid>.ora contains.
    HS_FDS_CONNECT_INFO = DISSQLT1
    HS_FDS_TRACE_LEVEL = off
    HS_FDS_SUPPORT_STATISTICS=FALSE
    HS_FDS_REPORT_REAL_AS_DOUBLE = TRUE
    select * from NLS_DATABASE_PARAMETERS returns:
    NLS_LANGUAGE     AMERICAN
    NLS_TERRITORY     AMERICA
    NLS_CURRENCY     $
    NLS_ISO_CURRENCY     AMERICA
    NLS_NUMERIC_CHARACTERS     .,
    NLS_CHARACTERSET     WE8MSWIN1252
    NLS_CALENDAR     GREGORIAN
    NLS_DATE_FORMAT     DD-MON-RR
    NLS_DATE_LANGUAGE     AMERICAN
    NLS_SORT     BINARY
    NLS_TIME_FORMAT     HH.MI.SSXFF AM
    NLS_TIMESTAMP_FORMAT     DD-MON-RR HH.MI.SSXFF AM
    NLS_TIME_TZ_FORMAT     HH.MI.SSXFF AM TZR
    NLS_TIMESTAMP_TZ_FORMAT     DD-MON-RR HH.MI.SSXFF AM TZR
    NLS_DUAL_CURRENCY     $
    NLS_COMP     BINARY
    NLS_LENGTH_SEMANTICS     BYTE
    NLS_NCHAR_CONV_EXCP     FALSE
    NLS_NCHAR_CHARACTERSET     AL16UTF16
    NLS_RDBMS_VERSION     11.1.0.7.0
    select * from NLS_INSTANCE_PARAMETERS return:
    NLS_LANGUAGE     ICELANDIC
    NLS_TERRITORY     ICELAND
    NLS_SORT     (null)
    NLS_DATE_LANGUAGE     (null)
    NLS_DATE_FORMAT     (null)
    NLS_CURRENCY     (null)
    NLS_NUMERIC_CHARACTERS     (null)
    NLS_ISO_CURRENCY     (null)
    NLS_CALENDAR     (null)
    NLS_TIME_FORMAT     (null)
    NLS_TIMESTAMP_FORMAT     (null)
    NLS_TIME_TZ_FORMAT     (null)
    NLS_TIMESTAMP_TZ_FORMAT     (null)
    NLS_DUAL_CURRENCY     (null)
    NLS_COMP     BINARY
    NLS_LENGTH_SEMANTICS     BYTE
    NLS_NCHAR_CONV_EXCP     FALSE
    select * from NLS_SESSION_PARAMETERS returns:
    NLS_LANGUAGE     ICELANDIC
    NLS_TERRITORY     ICELAND
    NLS_CURRENCY     kr.
    NLS_ISO_CURRENCY     ICELAND
    NLS_NUMERIC_CHARACTERS     ,.
    NLS_CALENDAR     GREGORIAN
    NLS_DATE_FORMAT     DD.MM.RRRR
    NLS_DATE_LANGUAGE     ICELANDIC
    NLS_SORT     ICELANDIC
    NLS_TIME_FORMAT     HH24:MI:SSXFF
    NLS_TIMESTAMP_FORMAT     DD.MM.RRRR HH24:MI:SSXFF
    NLS_TIME_TZ_FORMAT     HH24:MI:SSXFF TZR
    NLS_TIMESTAMP_TZ_FORMAT     DD.MM.RRRR HH24:MI:SSXFF TZR
    NLS_DUAL_CURRENCY     kr.
    NLS_COMP     BINARY
    NLS_LENGTH_SEMANTICS     BYTE
    NLS_NCHAR_CONV_EXCP     FALSE

  • MSSQL 2008 Precision Problem

    Hello everyone,
    I have a problem about precision range in MSSQL 2008. I am trying to transfer data from Oracle db to MSSQL db. One column in Oracle db has a precision larger than 38, which is '76.43448990049567164100213185805651059565'. Therefore, I give an execution error
    like;
    Caused By: weblogic.jdbc.sqlserverbase.ddc: [FMWGEN][SQLServer JDBC Driver]The number, 76.43448990049567164100213185805651059565, has a precision larger than allowed by the SQL Server.
    What can I do at this point? Please help me
    Thank You

    I have been posting answers to this question But its not getting posted - donno why. Here goes..
    Dilek,
    Do you really need that many decimal places? try limiting it down if possible. BEcause, SQL Server allows a max of precision value of 38 only in case of decimal/numeric. So you have the following alternatives:
    Reduce the number of decimal places and push it into SQL Server column having a datatype say, numeric(38,36)
    Split the value into two columns one for the absolute part having int type and another for decimal which can either have numeric(38,38) or an int which is to be converted to decimal during usage.
    Store as varchar type - but this would make it difficult to be used for calculation (Beware, even when you convert a 40 digit precision value from varchar to numeric you'll get the same error). So if it just for projecting the data (just for select) varchar
    should do fine.
    --method 1
    declare @tab table ( num numeric(38,36))
    insert @tab select 76.434489900495671641002131858056510595--65
    select * from @tab
    --method 2
    declare @tab table ( num int,dec numeric(38,38))
    insert @tab select 76,0.43448990049567164100213185805651059565
    select * from @tab
    select cast(num as varchar)+substring(cast(dec as varchar(100)),2,len(cast(dec as varchar(100)))),* from @tab
    select num+dec,* from @tab --decimal places get reduced beware..
    --method 3
    declare @tab table ( num varchar(100))
    insert @tab select 76.434489900495671641002131858056510595--65 -- ignoring last two digits
    insert @tab select '76.43448990049567164100213185805651059565' -- as varchar
    select cast(num as decimal(38,36)) from @tab --produces result for first one and error for second instance
    --Just normal
    select 76.434489900495671641002131858056510595 --works
    select 76.43448990049567164100213185805651059565 -- doesnt work
    Thanks,
    Jay
    <If the post was helpful mark as 'Helpful' and if the post answered your query, mark as 'Answered'>

  • Hp Pavilion g4, Product Number B6U80A, problem is Battery showed plugged in but not charging.

    Hi,
    I bought a hp pavilion g4 2036TU and Serial No is {Removed for privacy} and Product No is B6U80PA#ACJ from Cyborg world, Laminton Road, Mumbai, 400009 and invoice No is 302431 and that is hpauthorized showroom. From next couple of days i got a problem: "charger plugged in not charging". due to some busy work i not able to register complaint at that day but i register my complaint on 25-08-2012. They i...
    ssue a complaint no is HP Case ID #: 4681263011 but now current Case ID number is 4682402097 after i track lots effort they sent engineer Pradeep(9022181367) on site at 8-09-2012, and he didn't got any solution, and told me that he will order a battery as there are some problem in battery, but on next working day he called me and told that he sent a mail which contain a link to update BIOS and your problem surely resolved by that. But after using that link i updated BIOS but still problem and when i call to hpcustomer care they told me that your case is transferred to hp service centers, Vashi Navi Mubai. In between that I busy in my office work for some day and not get time to call again and again. And i got socked when I receive a mail from "{Personal Information Removed}" that your case is closed because your mobile is not reachable. But i all-ready contact to many time on
    customer care and also registered my response at Support Case
    Manager one day before their closing mail. After that on 15-09-2012 i again waist my full day on hp customer care to resolve my isuue ,
    but mostly they tell me your call connected in non-techinacal department, and you will get callback within 2 hour, but i don't get call back always.
    After done lots of call to many person, swati, rajani, pradeep, and to many customer agent they told that a engineer again visit to detect the problem, but i don't understand why they sent engineer again and again to only detect problem. And today another Engineer Mahesh Rahate(9702788581) visit and told that problem in motherboard and need to replace, These guy doing R & D on my system, they don't know what is problem. I attached receipt which given by their engineer. Their are not link between hp service center and hp customer care. Customer care agent told your case is referred to hp service center and they contact you, but don't tell any updated status.
    I have one major question why i ready to repair my mother board in newly system, I only want brand new System or refund my money. I have lost my hard earn money (approx 40000/-) in this process. So I only want either refund of money or newly brand system only, no any replacement.
    I have lost my whole month in that process and i also affected my work which affected by because of this system. It cost me more then 40000/- financially. So my one and last option to either refund my money or give brand new product, I don't want defected system replace again and again and my work suffer in future.
    And about my experience of Hp product, its wrost, in both term product wise and also in term of after sales services. How they pass testing of product and brought in market a defected product. And not provided proper service. So as per my experience I never suggest to purchase any hp product as per my worst experience of hp service after sales.
    Thanks!
    With Regards,
    Arvind Kumar Gangwar

    I saw your post and forwarded it to the right people a for their review. You should hear back from someone shortly.
    Be certain to watch for private messages.  
    This can be checked by usign the mail icon in the top-right corner next to your user name.
    ↙-----------How do I give Kudos?| How do I mark a post as Solved? ----------------↓

Maybe you are looking for

  • Error Code 800F0902 on several Windows 7 64 bit updates

    When I install the updates suggested by windows 7, several updates does not install. Error code: 800F0902. I am running Windows 7 64 bits. Some of the updates that failed to install are Security Related, but some not. Any Help? Thanks

  • Currency on Customer / Vendor Tolerances

    Hi Guru's, I am trying to configure vendor-specific tolerances. However, I need this tolerance to be created in EURO which is not the currency for the company code it's just a parallel currency (hard currency). When I create a new entry in config I a

  • To play video stream by using MHP

    Hi I want to play a video from the MHP application. Could anybody help me of that. Thanks, Ranikkarasu

  • Oracle Express vs Enterprise?

    Hi, I was wondering if there is a fact sheet out there on the differences between the various Oracle DBs. I have not been able to located one yet. I'm mainly interested if there are performance differences if any. If anyone could point me in the righ

  • JDeveloper + Oracle 10g

    Hello! I am using JDeveloper and Oracle 10g. I created the user and database. My database has one table. I want to use JDeveloper to write procedures, create tables etc. But here is a problem. I am able to connect to the database under login that I c