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