title: Concatenating a single column into a single row in SQL Server Management Studio
body: <p>I am trying to compile a list of dumpsters at a given location that a driver needs to pick up. I have a table like this: </p>
  
  <pre><code>Stop Number   Dumpster Number
  ------------------------------------    
      1              245
      1              248
      2              312
      2              314
      2              316
  </code></pre>
  
  <p>I would like it to look like this:</p>
  
  <pre><code>Stop Number    Dumpster Number
  -------------------------------
      1          245  248
      2          312  314  316
  </code></pre>
  
  <p>The code I built is below, but I am getting the same result as the first table, with just the spaces on the end.</p>
  
  <pre><code>SELECT 
      [StopNumber], 
      CAST((CONCAT([ContainerID],'  '))AS VARCHAR) AS ContainersAtStop
  FROM 
      [TripSchedule]
  GROUP BY 
      StopNumber, (CONCAT([ContainerID],'  '))
  </code></pre>
  
  <p>Any help would be greatly appreciated. </p>