title: Mule Sql Query - passing parameters to the IN operator
body: <p>I'm trying to create a mule flow that does a lot of DB (Microsoft SQL Server 2008 DB) operations.</p>
  
  <p>The first DB query I do returns a list of IDs</p>
  
  <pre><code>select id from first_table;
  </code></pre>
  
  <p>I run the payload through a Java transformer that builds an ArrayList:
  [1,2,3,4,5]
  and then save it as a variable <strong>indices</strong></p>
  
  <p>Then I try to use this Array in another query</p>
  
  <pre><code>select * from another_table where first_table_fk in (#[flowVars.indices]);
  </code></pre>
  
  <p>But no matter what I do I keep getting the error</p>
  
  <p>The conversion from UNKNOWN to UNKNOWN is unsupported.</p>
  
  <p>Mule can't handle the java.util.ArrayList (or a regular array, int[]) when using the IN operator.</p>
  
  <p>I then tried creating the whole query as a string variable (and then referencing it in the  ).</p>
  
  <p>This results with an exception: 
  java.lang.IllegalArgumentException: No SQL Strategy found for SQL statement: #[flowVars.queryString] </p>
  
  <p>Can you please help me with my problem (using the IN operator in Mule sql queries) ? </p>
  
  <p>I am using Mule studio 3.4.0 CE.</p>
  
  <p>Thanks!</p>