About 53 results
Open links in new tab
  1. rounding - SQL Round Function - Stack Overflow

    Jul 10, 2009 · ROUND (748.58, -1) 750.00 the second parameter: Lenght, is the precision to which numeric_expression is to be rounded. length must be an expression of type tinyint, smallint, or int. …

  2. Rounding off to two decimal places in SQL - Stack Overflow

    @Ram The question didn't specify the sql server engine - which is why i highlighted the round v cast on its own. The convert to numeric doesn't do rounding in all engines so if the calculated number was …

  3. sql server - Why ROUND () function adding too many trailing zeros ...

    Jun 10, 2025 · The ROUND function expects an "exact numeric or approximate numeric data type category" argument. When you use the ROUND function on the col column (which is a varchar(10)), …

  4. Round sum of decimal column in sql - Stack Overflow

    Feb 22, 2014 · I'm using this code to sum decimal values. SUM(Amount) as TotalAmount Amount column is decimal datatype Amount decimal (10,4) After summing up the columns I get values like …

  5. How do I calculate percentages with decimals in SQL?

    Dec 30, 2008 · How can i convert this to a decimal in SQL? Below is the equation and i get the answer as 78 (integer) but the real answer is 78.6 (with a decimal) so i need to show this as otherwise the …

  6. sql - ERROR: function round (double precision, integer) does not exist ...

    I was having an expression inside the round function as first parameter, that expression was returning 'double precision' value. After so much efforts I finally could solve the issue by enclosing the …

  7. SQL Server - How to round up or down decimals? - Stack Overflow

    I would like to be abble to round up or down 10.823. Expected result: rounding down = 10.82 rounding up = 10.83 Knowing that round(10.823, 2) only rounds down. How to round it up?

  8. sql - How to round an average to 2 decimal places in PostgreSQL ...

    The ROUND (float,int) function is f_round, it returns a (decimal) NUMERIC datatype, that is fine for some applications: problem solved! In another applications we need a float also as result. An …

  9. Truncate (not round) decimal places in SQL Server

    I'm trying to determine the best way to truncate or drop extra decimal places in SQL without rounding. For example: declare @value decimal(18,2) set @value = 123.456 This will automatically round @

  10. sql - Rounding number up or down, based on 0.5 and closest to round ...

    Dec 10, 2019 · 1 I'm having trouble using CEILING and FLOOR in SQL Server. The problem is, I want to round up based on decimal value 0.5 For example: