DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: Tell me where is goning wrong????

  1. #1
    Join Date
    Nov 2006
    Posts
    1

    Unhappy Tell me where is goning wrong????

    [pre]
    Dear All,

    I have 2 DB. One is in oracle and another is in sql server 2005.
    Both have same tables and records.
    Problem is that,
    I have one view. The script is same in Oracle and SQL server 2005.
    But for One calculation i am getting different values.

    calculation is:

    (CAST(FLOOR(((COALESCE(Factor, 0.0) * TerrRate) * POWER(10.0, 4)) + 0.5 ) as float) / POWER(10.0, 4)) * 100

    o/p of sql server is;
    ---------------------
    4.4600
    0.8600
    0.8000

    and o/p of Oracle is;
    -----------------------
    4.47
    0.86
    0.8

    why I am getting the 0.01 difference???
    The values for factor and terrrate is same in both DB.
    factor =
    -------
    0.0084
    0.009
    0.047

    and terrrate =
    -------------
    0.95
    0.95
    0.95


    Please sone one help me. I am in confusion...
    Thanks in advance.

    [/pre]

  2. #2
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    My calculator suggests the correct answer to be 4.47, so maybe this is a question for a sqlserver forum.
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

Posting Permissions

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


Click Here to Expand Forum to Full Width