I am having issues using the "IN" operator of a where clause in a Quer

I am having issues using the "IN" operator of a where clause in a Query Node to get data from SQL. An example of my SQL query is: SELECT COUNT(IDColumn) from dbo.TableName WHERE OtherColumn = aValue AND IDColumn IN (ac!varIds)
The data type of the "IDColumn" field is an integer - I have tried passing in a multi-value integer as the input, but I receive the error message: There was a problem executing the SQL query. SQL Message : [Ljava.lang.Long; cannot be cast to java.lang.Long] I have also tried using a string, but I still receive errors. How can I use ac variables with the "IN" operator to get the data? ...

OriginalPostID-85529

OriginalPostID-85529

  Discussion posts and replies are publicly visible

Parents Reply
  • Yes, it seems that array values are not handled correctly by the Query Database smart service.

    Here is a query that I have used to update a table in MySQL:

    UPDATE `TABLE_NAME` SET  `COLUMN_NAME`= 'new value'  WHERE INSTR(concat(',', ac!IDs, ','), concat(',', `TABLE_NAME`.`ID`, ',')) > 0

    where ac!IDs is TEXT, single type. And ac!IDs is configured as =joinarray(pv!idValueList,",")

    where idValueList is a process variable of type number, multi-valued (for example {100, 200})

Children
No Data