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
  • 0
    Certified Lead Developer
    Hi as per my understanding, it's something which you need to handle from Appian instead of dealing from SQL side, please make sure, you send the input as an array of Integer, and i believe this manipulation can be done using Appian while passing this input to Query Entity / Node like splitting the content, wherever semicolon (;) found or something similar to that.

    So, if you are able to send the required input (i.e. IDColumn) as List of Number (Integer) then, your IN operator should do it's rest of the Job.

    Hope this will help you.
Reply
  • 0
    Certified Lead Developer
    Hi as per my understanding, it's something which you need to handle from Appian instead of dealing from SQL side, please make sure, you send the input as an array of Integer, and i believe this manipulation can be done using Appian while passing this input to Query Entity / Node like splitting the content, wherever semicolon (;) found or something similar to that.

    So, if you are able to send the required input (i.e. IDColumn) as List of Number (Integer) then, your IN operator should do it's rest of the Job.

    Hope this will help you.
Children
No Data