title: Use Multiple Varchar as a parameter
body: <p>I am trying to create a query that will allow me to use multiple VarChars as a parameter in SSRS.</p>
  
  <p>Here's the code:</p>
  
  <pre><code>Declare @CallCodes as VarChar(10)
  Set @CallCodes = ('MORC30' , 'Morc60')
  
  ;
  With Data
  AS
      (SELECT 
          VC.[CallCode]
            ,VC.[HospCode]
            ,VC.[HospMastID]
            ,VC.[ClientID]
            ,Row_Number () Over (Partition By HospMastID, VC.ClientID Order By HospMastID, VC.ClientID, GLCode) as Txn
      FROM 
      [RptSys].[dbo].[CSC_VuesionImport_DevDetl] as VC
      Inner Join
      [AVimark_OLTP].[dbo].[Client] as C
      on
      VC.HospMastID = C.HospitalMasterID
      and
      VC.ClientID = C.ClientID
      Inner Join
      [Avimark_OLTP].[dbo].[Patient] as P
      on
      VC.HospMastID = P.HospitalMasterID
      and
      VC.PatientID = P.PatientID
      Inner Join
      [Avimark_OLTP].[dbo].[Treatment] as T
      on
      VC.HospMastID = T.HospitalMasterID
      and
      VC.MastReminder = T.Code
      Where
      VC.CallCode in @CallCodes)
  </code></pre>
  
  <p>This gives an error when I try to run it.  The final output is to allow the end user to choose from a drop down list in an SSRS report I have tried all variations of in or like for the where statement.</p>
  
  <p>Any suggestions would be greatly appreciated.</p>