title: SQL Server - LIST AGG with quotes
body: <p>I'm trying to use the answer found <a href="https://stackoverflow.com/questions/15477743/listagg-in-sqlserver">here</a> to concatenate a grouped collection of strings except I'd like the output to have quotes around each item.</p>
  
  <pre><code>Field A | Field B
  1       |  A
  1       |  B
  2       |  A
  
  1 | "A","B"
  2 | "A"
  
  SELECT FieldA , STUFF(( SELECT  ','+ FieldB FROM TableName a
  WHERE b.FieldA = a.FieldA FOR XML PATH('')),1 ,1, '')  Members
  FROM TableName b
  GROUP BY FieldA;
  </code></pre>
  
  <p>I've tried adding quotes before and after the comma but the format isn't correct. </p>
  
  <p>Any suggestions?</p>