title: Multiple values in a single parameter of a scalar function
body: <p>Is there a way to input multiple values in a single parameter of a scalar-valued function in SQL Server 2008 R2 and have it filter data by that parameter using both values? </p>
  
  <p>For example I would like to do the following</p>
  
  <pre><code>    SET @Salesperson='BILL' OR 'MOSES'
  
      SELECT Sum(SalesDollars)
      FROM Invoices
      WHERE Invoices.Salesperson = @Salesperson
  </code></pre>
  
  <p>I attempted to use the following as the WHERE clause, but this didnt work either.</p>
  
  <pre><code>    SET @Salesperson='BILL','MOSES'
  
      SELECT Sum(SalesDollars)
      FROM Invoices
      WHERE Invoices.Salesperson IN (@Salesperson)
  </code></pre>
  
  <p>Would it be easier if i were dealing with integers as opposed to varchar values?</p>
  
  <p>Any help would be absolutely appreciated!</p>