Custom SQL JDBC Adapter Service with dynamic values as input

Hi All,

I am trying to configure SQL database JDBC adapter service to achieve query as mentioned below.

UPDATE StagedData
SET Status = ‘1’
WHERE ItemName in ( ? )

number of elements in IN statement can go up to 500 elements like " IN(241564,241570,241571)"

Error Screenshot from toolkit is attached for reference.

I am using Custom JDBC Adapter service, which works fine when only value (Ex : 241564) which results in query executed as “UPDATE StagedData SET Status = ‘1’ WHERE ItemName in (241564)” and result in success.

Any help in this regard will be highly helpful.

Thanks,
Kumar Shanmugam J

The ? is for a single value. When you pass 241564,241571 as the value for the ?, it assumes that you want to pass in the string “241564,241571”.

Some other options to consider:

  1. Use BatchUpdateSQL
  2. Use DynamicSQL
  3. Create a stored proc that takes a list of IDs as input and does the update for you.

Percio