title: SSIS - SQL Command - Parameters
body: <p>I edited the question based on the solution that Hadi gave.</p>
  
  <p>I am using SSIS in VS 2013.
  I have a user variable called MyVariableList and Query.
  <a href="https://i.stack.imgur.com/NnidB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NnidB.png" alt="enter image description here"></a></p>
  
  <p>This is Expression in user variable Query: "SELECT cola, colB FROM myTable WHERE myID IN (" +  @[User::MyVariableList] + ")"
  <a href="https://i.stack.imgur.com/4uylk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4uylk.png" alt="enter image description here"></a></p>
  
  <p>I have a Script Task that set the value of @[User::MyVariableList].</p>
  
  <pre><code>Dts.Variables["User::MyVariableList"].Value = sList;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/CGzqf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CGzqf.png" alt="enter image description here"></a></p>
  
  <p>After that, I have A Data Flow Task with OLE DB Source (from 1 database) to another OLE DB Destination (another database on another server).
  In the OLE DB Source Editor, I set 
  Data access mode: SQL Command from variable
  Variable name: User:: Query
  <a href="https://i.stack.imgur.com/bWok6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bWok6.png" alt="enter image description here"></a></p>
  
  <p>In the OLE DB Source connection, I have set the DelayValidation to True
  <a href="https://i.stack.imgur.com/bw6ps.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bw6ps.png" alt="enter image description here"></a></p>
  
  <p>Before I even can run the package, I am getting this error
  <a href="https://i.stack.imgur.com/6LqOl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6LqOl.png" alt="enter image description here"></a>
  How can I fix this issue ? Thank you</p>