Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Verified Answer
+2
person also asked this
people also asked this
Replies
8 replies
Answers
1 answer
Subscribers
10 subscribers
Views
12222 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Integrations
I am having issues using the "IN" operator of a where clause in a Quer
wendys42
over 11 years ago
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
Rully
over 11 years ago
Instead of doing IN clause, try to do this way:
SELECT idCol FROM yourTable WHERE CHARINDEX(',' + idCol + ',' , ac!idArrayString)>0
And then define the ac!idArrayString in the input tab as the following expression:
="," & joinarray(pv!idArray,",") & ","
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
Rully
over 11 years ago
Instead of doing IN clause, try to do this way:
SELECT idCol FROM yourTable WHERE CHARINDEX(',' + idCol + ',' , ac!idArrayString)>0
And then define the ac!idArrayString in the input tab as the following expression:
="," & joinarray(pv!idArray,",") & ","
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data