• paul.knibbs (8/24/2010)


    Hugo Kornelis (8/24/2010)

    Super! Thanks for testing and reporting back here.

    Obviously, this weird behaviour that appears to be exclusive to the ROUND() function has been fixed in SQL Server 2008.

    Is it a problem with the ROUND() function, or something else? It seems odd that when you select the content of WeirdTable before dropping it that you get the single 1000.00 value returned on SQL 2005--you would have thought it wouldn't allow you to insert that value in a DECIMAL(5,2) column in the first place, regardless of where it came from!

    I think it's the ROUND() function, as I have so far not been able to reproduce this behavour in any other way.

    Returning 1000.00 when you SELECT from the table is just as subject to the client being used as getting a result from running "SELECT ROUND(789.87, -3);" directly. QA and osql.exe display the value; SSMS returns an error message.


    Hugo Kornelis, SQL Server/Data Platform MVP (2006-2016)
    Visit my SQL Server blog: https://sqlserverfast.com/blog/
    SQL Server Execution Plan Reference: https://sqlserverfast.com/epr/