title: Formatting multi-value SSRS Parameter
body: <p>I am trying to pass in multiple values to a query via SSRS.  They are IDs without leading zeros.  I want to add the leading zeros so that the total digits in the ID is 7. (87886,88352) becomes (0087886,0088352).  I had the idea to use a cursor or put it into a temp table, but no matter what I think to do, I run into the same issue where there's just not much I can do with a list of IDs.  No matter what I try, at some point I'm going to need to deal with the list dynamically.  Either dynamically appending the zeros, counting the values, or adding them as rows to a table.  In any case, I'm just not sure how to deal with a list from SSRS in this fashion.</p>
  
  <pre><code>SELECT * FROM PERSON WHERE ID IN (RIGHT('0000000' + @pIDs,7))
  </code></pre>
  
  <p>That's the idea I'm going for, where @pIDs is a list from SSRS.</p>