title: SQL Update string list of IDs with string list of values
body: <p>I want to update in stored procedure a list of IDs passed in string comma separated list with a string comma separated list of Values.</p>
  
  <p>So How can i update each ID with it's corresponding name from the 2 lists.
  for example:</p>
  
  <pre><code>ids = "1, 2, 4 ,8";
  names = "sam, john, sarah ,barry";
  
  ALTER PROCEDURE [dbo].[update_work]
    @ids nvarchar(MAX),
    @names nvarchar(MAX)
  AS
  BEGIN
      ???
  END
  </code></pre>