Decimal Data Type

  • Robert Eder

    Hall of Fame

    Points: 3326

    Comments posted to this topic are about the item Decimal Data Type

  • Stewart "Arturius" Campbell

    SSC Guru

    Points: 71615

    Interesting question, Robert
    Had to read up on this, so learned something

    Space, the final frontier? not any more...
    All limits henceforth are self-imposed.
    “libera tute vulgaris ex”

  • RandomEvent


    Points: 2963

    Great question introduced me to some SQL 2012 functionality I've not come across before.

  • TimCarrett

    Default port

    Points: 1484

    Very interesting question. Thanks for the link as well.

  • paul s-306273


    Points: 10615

    Much more interesting QOTD than at first glance.

  • Jeff Atherton


    Points: 2663

    Good question. I recently found myself researching that Precision, Scale and Length page to figure out why some division kept giving me extra zeros at the end of the number.  And it was because of simple math: max(6, s1 + p2 + 1)

  • TomThomson

    SSC Guru

    Points: 104772

    Nice question.  Illustrates the pitfalls of the decimal numbers combination rules (which are a consequence of the silliness of the definition of the decimal type) with a simple piece of arithmetic which throws away 5 orders of magnitude of accuracy for no good reason at all. 

    The sooner we get hardware and software which supports the modern floating point standard instead of decades outdated nonsense (for both decimal and floating point) that forces us to choose one wrong type or another because the right type isn't available the better.  But I don't see any sign of it happening, partly because almost everybody is wedded to one side or the other of the "lets to decimal/floating point because floating point/decimal is hopelessly wrong" wars and aren't even aware that the latest IEEE standard provides the best of both worlds and the inherent faults of neither.  And partly because the hardware won'tbecome common until it's clear that the software will use it, and the software companies probably won't plan to use it until after both (a) the hardware has become common and (b) the ignoramuses on standards committees wake up and add a datatype that represents it to the SQL standard and lots of other langage standards.


  • Revenant


    Points: 42467

    Interesting question and interesting discussion. Thanks to both Robert and Tom!

  • kapfundestanley


    Points: 5627

    Trick question,but got it.

    “When I hear somebody sigh, ‘Life is hard,’ I am always tempted to ask, ‘Compared to what?’” - Sydney Harris

  • RandomEvent


    Points: 2963

    Like these sorts of questions the ones where you go I know this, then take a step back and do the reading due to that niggle of doubt that creeps in. Its the niggle of doubt that keeps us learning and on our toes.

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

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