title: calling SSIS package with input parameters on stored procedure
body: <p>I have SSIS packages that is expecting an input parameter ID(integer).
  I need to execute this SSIS package using stored procedure so that I can pass the value of the ID.  </p>
  
  <pre><code>DECLARE @Command varchar(1000)
      , @PackageLocation varchar(1000)
      , @PackageName varchar(1000)
      , @XmlID int
  
  SELECT TOP 1 @XmlID = XmlId 
  FROM dbo.ENROLMatchingXML
  WHERE IsProcessed = 0
  
  SET @PackageLocation = 'E:\SSIS\Package'
  SET @PackageName = 'Match Names.dtsx'
  SET @Command = 'DTEXEC'
      + ' /File "' + @PackageLocation + '\' + @PackageName + '"'
  
      + ' Set \Package.Variables[user::XMLID].Properties[Value];'  + @XmlID 
  -- print just to show the string @command
  print @Command
  
  EXEC xp_cmdshell @Command
  </code></pre>
  
  <p>Do I need to cast the @XmlID to character? If I did, I'm getting an error - <em>Option "Set" is not valid.</em></p>