#464 Problems with DECIMAL (31,0) values

2.3.1
closed-fixed
Core (462)
5
2007-03-29
2006-12-11
nerzfarm
No

Colums defined with DECIMAL(31,0) on a DB2 v8 on OS390 are displayed incorrect.
example :
All values will be displayed as
8.840.000.000.000.000.000.000.000.000.000

but in real life the last 5 digits differ (confirmed by using DB2 Command Tools to access the DB)!

Things worked corectly in Squirrel 2.2 final --> must be a bug in 2.3.

Thanks,
Pascal

Discussion

  • nerzfarm

    nerzfarm - 2006-12-14

    Logged In: YES
    user_id=1665712
    Originator: YES

    Additional note: problem exists even on DB2 Version 7 and 8 on Windows XP

     
  • nerzfarm

    nerzfarm - 2006-12-14

    Logged In: YES
    user_id=1665712
    Originator: YES

    Correction: Things worked in 2.1 final and NOT in 2.2

     
  • Rob Manning

    Rob Manning - 2007-03-25
    • labels: 336290 --> Core
    • status: open --> pending
     
  • Rob Manning

    Rob Manning - 2007-03-25

    Logged In: YES
    user_id=1287991
    Originator: NO

    I must be missing something because I cannot reproduce this with the latest snapshot on DB2 PE 8.1 (WinXP). See the screen caps that are attached. My table def is:

    CREATE TABLE TEST3
    (
    FOO REAL,
    LARGEDECIMAL DECIMAL(31)
    );

    This bug report would be much better if you could provide us with a data script and instructions on how to reproduce the issue you are experiencing.

     
  • Rob Manning

    Rob Manning - 2007-03-25

    Object Tree Table Contents Tab

     
  • Rob Manning

    Rob Manning - 2007-03-25

    Logged In: YES
    user_id=1287991
    Originator: NO

    File Added: 1613162_contents.jpg

     
  • Rob Manning

    Rob Manning - 2007-03-25

    Logged In: YES
    user_id=1287991
    Originator: NO

    File Added: 1613162_editor.jpg

     
  • nerzfarm

    nerzfarm - 2007-03-29

    Logged In: YES
    user_id=1665712
    Originator: YES

    Hi,
    I am confused. I just tested again using SQuirreL SQL Client Version 2.3.2.
    Here is my script:

    CREATE TABLE TESTTABLE (
    OID DECIMAL(31) NOT NULL,
    SOMESTRING CHAR(12),
    PRIMARY KEY (OID)
    )
    ;

    CREATE VIEW TESTVIEW
    AS SELECT *
    FROM TESTTABLE
    ;

    INSERT INTO TESTTABLE (OID, SOMESTRING) VALUES (8840000000000000000000000000123, 'DUMMY');

    SELECT * FROM TESTTABLE;
    SELECT * FROM TESTVIEW;

    See buggy_result.jpg for the resulting select statement.

    Using the commandline tool db2level I get
    DB21085I Instance "DB2" uses DB2 code release "SQL07028" with level identifier
    "03090105" and informational tokens "DB2 v7.1.0.88", "n030813" and "WR21331".

    as DB2 Version for my local Windows XP Installation.
    Any ideas?

     
  • nerzfarm

    nerzfarm - 2007-03-29
    • status: pending --> open
     
  • nerzfarm

    nerzfarm - 2007-03-29

    Logged In: YES
    user_id=1665712
    Originator: YES

    File Added: buggy_result.jpg

     
  • nerzfarm

    nerzfarm - 2007-03-29

    Buggy Result of Select on Decimal(31) columns

     
  • Rob Manning

    Rob Manning - 2007-03-29

    Logged In: YES
    user_id=1287991
    Originator: NO

    File Added: 1613162_user_script.JPG

     
  • Rob Manning

    Rob Manning - 2007-03-29

    Result of User Script on DB2 PE 8,1 with latest snapshot

     
  • Rob Manning

    Rob Manning - 2007-03-29

    Logged In: YES
    user_id=1287991
    Originator: NO

    Can you download the latest snapshot and try it again? I've attached the output of your script which I got from the latest snapshot, using "locale-dependent" format in Global Preferences -> Data Type Controls -> Float, Real, Numeric... setting. I'm not getting the same problem. What driver are you using? I'm using

    getDriverName IBM DB2 JDBC Universal Driver Architecture
    getDriverVersion 2.6.80
    JDBC Driver CLASSNAME com.ibm.db2.jcc.DB2Driver
    JDBC Driver CLASSPATH C:\tools\DB2_PE\java\db2jcc.jar;C:\tools\DB2_PE\java\db2jcc_license_cu.jar

    You can get this by selecting the top node in the Object tree and clicking on the MetaData tab.

    Rob

     
  • nerzfarm

    nerzfarm - 2007-03-29

    Logged In: YES
    user_id=1665712
    Originator: YES

    Hi Rob,
    my Metadata
    JDBC Driver CLASSNAME COM.ibm.db2.jdbc.app.DB2Driver
    JDBC Driver CLASSPATH D:\Programme\SQLLIB\java12\db2java.zip

    I just tested the script using the latest snapshot. I did not perform any re-configurations in the global preferences section.
    And it works - the latest snapshot fixes the bug.

    Thanks for your efforts!

     
  • Rob Manning

    Rob Manning - 2007-03-29
    • status: open --> closed-fixed
     

Log in to post a comment.