title: Need to make multiple changes to a string using data from a temp table
body: <p>I have a CSV-style <code>varchar</code> that contains the IDs (foreign keys) of records in another table (that table is not important to this question). Note that this CSV always has leading and trailing COMMA chars.  </p>
  
  <pre><code>Select ts_Associated_Requirements 
  from usr_Change_Rqst:
  
  
  ,455,616,854,1093,1094,1095,1096,1097,1098,1123,1222,
  </code></pre>
  
  <p>I need to remove the IDs that are in the CSV and that are listed in a temp table created for me:</p>
  
  <pre><code>CREATE TABLE #TasksToReassign (ID INT NOT NULL);
  
  INSERT INTO #TasksToReassign  ....blahblah... ;
  
  SELECT * FROM #TasksToReassign ;
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code> ID         
   -----------
           666
           854
          1093
          1094
          1095
          1097
          1098
  </code></pre>
  
  <p>This is a simplified example. I know that for a limited number if replacements I could nest <code>REPLACE()</code> statements, but that becomes unwieldy when the temp table contains 50 or more values to be removed and the CSV contains hundreds,</p>
  
  <p>I don't have the database privileges to create functions, so please consider an answer using simple SELECT / UPDATE.</p>
  
  <p>Original string:</p>
  
  <pre><code>    ,455,616,854,1093,1094,1095,1096,1097,1098,1123,1222,
  </code></pre>
  
  <p>What I want</p>
  
  <pre><code>    ,455,616,1096,1122,1223,
  </code></pre>
  
  <p><strong>NOTE</strong>: This situation is for a commercial off-the-shelf software product.  I can't redesign their database or tables.</p>
  
  <p>Using SQL Server 2012 on Windows Server 2012 R2.</p>