VAR Char to Dollar Format

Lauren Sloan 0 Reputation points

I have a column totalAmount and want to convert so that the amount is in US Dollar format.

Example: 9729.20 and I want it to read $9729.20 in display.

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
10,959 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Erland Sommarskog 87,431 Reputation points
    SELECT concat('$', TotalAmount) FROM tbl

    However, normally you do formatting like this in the presentation layer.

    0 comments No comments

  2. Naomi 7,361 Reputation points


    SELECT FORMAT(100999.99,'C')

    0 comments No comments