Show data with decimal places

  • I have a table with a column that is float data type.

    When I have an integer value, I need that show this data with 2 decimal places, for example If I have the value 5, I need show 5,00

    If the value is 3,2, I have to show 3,20

    I don`t know how can I show with two decimal places

    Anyone Can help me?

  • SELECT CAST(5 AS DECIMAL(9,2))

    SELECT CAST(3.2 AS DECIMAL(9,2))

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

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

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