About 210,000 results
Open links in new tab
  1. How to convert integer to decimal in SQL Server query?

    Apr 23, 2012 · A column height is integer type in my SQL Server table. I want to do a division and have the result as decimal in my query: Select (height/10) as HeightDecimal How do I cast so …

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

    I need to convert minutes to hours, rounded off to two decimal places. I also need to display only up to two numbers after the decimal point. So if I have minutes as 650, then hours should be …

  3. sql server - SQL - Convert number to decimal - Stack Overflow

    I'm trying to convert a number to a decimal with two decimals places. SELECT CONVERT(DECIMAL(10,2),12345) The above would return 12345.00 but I'm trying to achieve …

  4. Convert decimal number to INT SQL - Stack Overflow

    Mar 30, 2016 · I want to convert the decimal number 3562.45 to 356245, either as an int or a varchar. I am using cast(3562.45 as int), but it only returns 3562. How do I do it?

  5. Write a number with two decimal places SQL Server

    Jan 13, 2021 · Generally you can define the precision of a number in SQL by defining it with parameters. For most cases this will be NUMERIC(10,2) or Decimal(10,2) - will define a …

  6. How to display two digits after decimal point in SQL Server

    Nov 21, 2013 · This question is similar to: how to get 2 digits after decimal point in tsql?. If you believe it’s different, please edit the question, make it clear how it’s different and/or how the …

  7. Format number as percent in MS SQL Server - Stack Overflow

    May 7, 2015 · I am trying to simply format a number as a percent with two decimal places. If it is 37 divided by 38 (aka .973684210526315789), I would like it to show 97.36 % in the SQL output.

  8. sql - VARCHAR to DECIMAL - Stack Overflow

    I want to convert a varchar(max) column to decimal(10,4). When I try to use cast or convert I am getting an arithmetic overflow exception. The issue is that the data stored in the varchar …

  9. CAST or convert Numeric to Money without rounding in SQL server

    Dec 1, 2017 · CAST or convert Numeric to Money without rounding in SQL server Asked 8 years ago Modified 3 years, 3 months ago Viewed 13k times

  10. sql server - Convert Decimal to Varchar - Stack Overflow

    Jul 20, 2017 · I have a decimal column in a table defined as decimal(8,3). I would like to include this column in a Select statement, convert it to a Varchar and only display two decimal places. …