Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2005
    Posts
    14

    Unanswered: SQL Returns different results on DB2 9.7

    We are using DB2 9.7 FP4 on Development and Production Servers. AIX 7.1 is being used in Production and Development Servers.

    Following SQL returns <null> value in Development. Same SQL returns <Error> in Production.

    SELECT sum(cast(lvy_total_amount as decimal(19,2))) FROM LVY_MST where LVY_ID in (102318,102319,102320,102321,102322,102323)


    Difference between Production and Development database server is Production database is using PowerHA and Archive log enabled.

    My question is same db2 versions returns different values. Is there any db configuration settings to be changed ?

  2. #2
    Join Date
    Apr 2008
    Location
    Iasi, Romania
    Posts
    561
    Provided Answers: 2
    You probably have different data in PROD and DEV.
    In PROD, some value cannot be converted to decimal, so it returns an error. In DEV you do not have that value.
    Florin Aparaschivei
    DB2 9.7, 10.5 on Windows
    Iasi, Romania

  3. #3
    Join Date
    Aug 2005
    Posts
    14
    Both DB has same values. All values are null in both db.

  4. #4
    Join Date
    Apr 2012
    Posts
    1,035
    Provided Answers: 18
    What is the actual error (SQLCODE, SQLSTATE) you get in PROD? (Writing <Error> is NOT a valid description).

    How did you *prove* that the contents of table LV_MST is identical between DEV and PROD ?

  5. #5
    Join Date
    Aug 2005
    Posts
    14
    In SQuirrel client, result set for these query returns <Null> for Development and <Error> for Production. Data is identical as production data exported and imported in development for these table.

  6. #6
    Join Date
    Apr 2012
    Posts
    1,035
    Provided Answers: 18
    If your Squirrel SQL tool is unable to show the error, then just stop using that tool.
    Try the same queries from the command-line on AIX.
    If you must use a GUI then use one that shows full error details. Otherwise you are just timewasting.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •