title: SQL ROUND decimal and display as varchar
body: <p>I have some decimal fields in my table. I am trying to ROUND them and display in the desired format. Here is an example:</p>
  
  <pre><code>CREATE TABLE #SummaryData(
  [ColA] [decimal](18, 1) NULL,
  [ColB] [decimal](18, 2) NULL,
  [ColC] [decimal](18, 4) NULL,
  [ColD] [decimal](18, 4) NULL,
  [ColE] [decimal](18, 4) NULL
  )
  
  INSERT INTO #SummaryData ([ColA],[ColB],[ColC],[ColD],[ColE])
  VALUES (36754.0 ,9090.07,   2.4507  ,33536.0000 ,0.0073)
  
  INSERT INTO #SummaryData ([ColA],[ColB],[ColC],[ColD],[ColE])
  VALUES (54978.0 , 12535.32  , 9.9419,47041.0000,    0.0088)
  
  INSERT INTO #SummaryData ([ColA],[ColB],[ColC],[ColD],[ColE])
  VALUES (53501.0,    13346.62,   2.8152, 32371.0000, 0.0042)
  
  SELECT [ColA],[ColB],[ColC],[ColD],[ColE] 
  FROM #SummaryData
  
  
  -- We need data to be displayed like this for the purpose of reporting
  ColA      ColB         ColC   ColD    ColE
  ----------------------------------------
  36,754     9090        2.46   33.5%   0.7%
  </code></pre>
  
  <p>I tried to use ROUND and convert to varchar but did not work. Not sure how to get rid of zeros after decimal and apply "," (commas). Any suggestions?</p>