Decimal(18,2) Data Type -- Equality Problem...

  • Isn't the decimal data type an exact representation? I'm not looking at some irrational number, but an amount of money of exactly $2000.00, and I have a SUM function that adds up that amount from one record of that amount, and then a comparison between the SUM and the original amount that fails to deliver equality. Any ideas, or have I missed something basic here? I know about the problem with doing such things with float, but I don't see why I would have this problem with decimal data type.

    Thanks in advance for any/all assistance - this one's a bit urgent!

    Steve

    (aka smunson)

    :):):)

    Steve (aka sgmunson) 🙂 🙂 🙂
    Rent Servers for Income (picks and shovels strategy)

  • Sorry folks - false alarm. I just had a senior moment and forgot about a reversed sign that was needed for the comparison. Once I tried multilplying the original source columns by 100, I saw the sign difference in the results and realized what I did wrong. Problem resolved.

    Steve

    (aka smunson)

    :rolleyes::rolleyes::rolleyes:

    Steve (aka sgmunson) 🙂 🙂 🙂
    Rent Servers for Income (picks and shovels strategy)

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

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