get real!

  • Comments posted to this topic are about the item get real!

  • real is actually a synonym for float(24) which has a precision of only 7 digits.

  • SQL 2005 actually displays the answer as 1234567936. I tested this to make sure. The scientific notation might only be displayed depending on your local configuration options.

  • In my environment, SQL 2005 & SQL 2008 display it the same way as the correct answer.

  • Suppose it depends on which query tool you use. If you use the one built into Microsoft SQL Server Management Studio, it does display in scientific notation.

    SQLDBX displays as 1234567936

    It's probably SQLDBX that is translating it back into a non-scientific notation number.

  • The questions are almost always built on the native tools unless noted.

    your client tool will indeed translate things.

  • At least the correct answer wasn't "close" to all the other answers because none of the answers are correct in 2k.

    1.2345679E+9

    Before you start beating the "latest version" drum on that... I can't put my hands on the URL but I remember seeing a recent poll where 67% of all data centers that took part in the survey still had at least 1 server running SQL Server 2000.

    With that in mind, I believe that it's still worthwhile listing what version of SQL Server the question is for.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • steve.saunders (6/26/2009)


    real is actually a synonym for float(24) which has a precision of only 7 digits.

    You are right! Real and float(24) only has a precision of 7 seven digits. The answer is correct but the explanation is a little bit misleading. At least if MS is following the ISO standard 😀

    The ISO synonym for real is float(24).

    http://msdn.microsoft.com/en-us/library/ms173773.aspx

    /Håkan Winther

    /Håkan Winther
    MCITP:Database Developer 2008
    MCTS: SQL Server 2008, Implementation and Maintenance
    MCSE: Data Platform

  • in SQL server 2005 result is 1.234568E+09

    while in SQL 2000 result is 1.2345679E+9

    Does it make any difference ?

    SQL DBA.

  • SanjayAttray (6/29/2009)


    in SQL server 2005 result is 1.234568E+09

    while in SQL 2000 result is 1.2345679E+9

    Does it make any difference ?

    Heh... only if you're answering a QOD and only if both answers are available in the multiple guess section.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • SanjayAttray (6/29/2009)


    in SQL server 2005 result is 1.234568E+09

    while in SQL 2000 result is 1.2345679E+9

    Does it make any difference ?

    It is dependant on the client tool

    QA shows 1.2345679E+9 SQL2000 & SQL2005

    SSMS shows 1.234568E+09 SQL2000 & SQL2005

    Far away is close at hand in the images of elsewhere.
    Anon.

Viewing 11 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic. Login to reply