• One important observation: This is an error caused within the client tool, not within SQL Server.

    Query Analyzer has no issues; SQL Server management Studio does have the issue.

    It does not matter against which database version you are executing this query.

    Try this as well to see the error happen only when you actually return results to the client:

    DECLARE @a sql_variant

    SET @a = ROUND(0.5,0);

    SELECT CAST(SQL_VARIANT_PROPERTY ( @a , 'BaseType') AS varchar(10)) [BaseType]

    ,CAST(SQL_VARIANT_PROPERTY ( @a , 'Precision') AS varchar(10)) AS [Precision]

    ,CAST(SQL_VARIANT_PROPERTY ( @a , 'Scale') AS varchar(10)) AS [Scale]

    SELECT @a

    SQL Server Query Analyzer will execute the code without error, and SQL Server Management Studio will error only for "SELECT @a".

    To me it looks like this is an issue with incorrect metadata being returned. The data itself obviously seems to be correct.

    Edit: sqlcmd does not throw an error either - so this seems to be an issue with SSMS only.

    Best Regards,

    Chris Büttner