title: T-sql query to output the values in CSV format
body: <p>I have a values in a table as shown below.  I need to get the <strong><code>generation times</code></strong> in comma seperated values for each <strong><code>subscriptionID</code></strong>.</p>
  
  <h2>SubscriptionID GenerationTimes</h2>
  
  <pre><code>6519    NULL
  6616    NULL
  6617    NULL
  6618    9:00:00
  6618    17:00:00
  6634    NULL
  6698    0:00:00
  </code></pre>
  
  <p>I need the result as follows</p>
  
  <h2>SubscriptionID GenerationTimes</h2>
  
  <pre><code>6519    NULL
  6616    NULL
  6617    NULL
  6618    9:00, 17:00
  6634    NULL
  6698    0:00:00
  </code></pre>
  
  <p>you notice for subscriptionID <strong>6618</strong> there are two generation times and so I have to put them in one row with comma ',' separated.  Please give me suggestion how i can write the T-sql statement.</p>