Thanks for the replies - I have tried creating a dynamic SQL adapter service and that doesn’t look like it works either, to test the theory I created the service with a single input parameter that is the entire sql command I’m trying to run (so the SQL entered in the dynamic service is just a ? character). The input parameter is than given the value:
select count(*) from table where field1 = ‘Value’ and field2 in (‘a’, ‘b’, ‘c’)
The documentation for the Dynamic adapter suggests this should work but it doesn’t.
If I edit the sql statement in the service to:
select count(*) from table where field1 = ?
This works ok if I pass value in as the input. If I then change the sql to:
select count(*) from table where field1 = ? and field2 ?
Then pass in:
value
in (‘a’, ‘b’, ‘c’)
This doesn’t work.
If I edit the sql statement in the service to:
select count(*) from table where field1 = ? and field2 in ?
Then pass in:
value
(‘a’, ‘b’, ‘c’)
This also does not work.
If I edit the sql statement in the service to:
select count(*) from table where field1 = ? and field2 in (?)
Then pass in:
value
‘a’, ‘b’, ‘c’
This also does not work.
If I use the ‘in’ and pass a single value without the brackets and single quotes then the statement executes ok. It doesn’t look like it can handle the list of values being given to it - but I would have expected the example where I just pass in the whole sql statement to have worked. It appears that as soon as I introduce the single quote character it no longer works - is there something I need to do to escape these characters?
All ideas appreciated - I didn’t think this was a difficult task but it’s proving awkward!