title: mysql query needs to be converted in sql server having find_in_set and group_concat keywords
body: <p>I have two tables orders and company. Company table contains unique company id and company name.  </p>
  
  <p>Orders table has two column, one is orderid and other is companyIDs. CompanyIds can be multiple comma separated values.</p>
  
  <p>I am using following query to get the company name corresponding to each company id of orders table.</p>
  
  <pre><code>SELECT 
      (SELECT GROUP_CONCAT(cmp.cmpny_name) 
      FROM company cmp 
      WHERE FIND_IN_SET(cmp.CompanyID, odr.companyIDs) 
      ) AS company
  FROM orders odr
  </code></pre>
  
  <p>It works perfectly fine in Mysql but not in sql server as these keywords are not supported in sql server and I haven' worked on sql server much so please help me to find correct way to accomplish this.</p>
  
  <p>Thanks</p>
  
  <p>On search, I have got some keywords like stuff for group concat but not able to use properly. Not able to find an equivalent of the find_in_set for sql server.</p>
  
  <pre><code>SELECT 
      (SELECT GROUP_CONCAT(cmp.cmpny_name) 
      FROM company cmp 
      WHERE FIND_IN_SET(cmp.CompanyID, odr.companyIDs) 
      ) AS company
  FROM orders odr
  </code></pre>
  
  <p>Not working in sql server</p>