Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
15 replies
Subscribers
9 subscribers
Views
6670 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
I am running a simple query where I want to get multiple values from db. s
nitas811
over 10 years ago
I am running a simple query where I want to get multiple values from db.
select x from pushgrouptable where jiraId in ('PPCQV1','PPCQV2')
The query works from sql however from appian I do not get any data. Is there anyway to get this info from table? ...
OriginalPostID-122365
OriginalPostID-122365
Discussion posts and replies are publicly visible
0
subhankarb
over 10 years ago
You can not use In operator in Query DB Node in Appian.Instead of In you can go for INSTR function.
select x from pushgrouptable where instr(','||ac!jiraId||',', ','||jiraId||',')>0 . To Pass the parameters you can use.-- joinarray({"PPCQV1","PPCQV2"},",")
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
nitas811
over 10 years ago
Is there any documentation on instr? where can I find it. If my string is PPCQV-1,PPCQV-2,PPCQV-3 CAN i use where instr(','||ac!jiraid)> 0 ?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
nitas811
over 10 years ago
NM found it online will try it out.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 10 years ago
1. That's the correct sytntax, I just tested and works for me (see attached sxreenshot).
2. Does the node fail or it completes but doesn't return anything?
3. Can you attach a set of screenshots showing how this node is configured and the behavior you see when it runs?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 10 years ago
Sorry for the duplicate post. I should have refreshed it to see someone had already answered.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
nitas811
over 10 years ago
The node is not failing but there is no output. So is in supposed to work or not?
appianquery.docx
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 10 years ago
My example uses hard-coded values, if your values are dynamic and come from a process variable then you have to use the approach that the other user explained (e.g.using instr)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 10 years ago
Here's another discussion about the same topic
forum.appian.com/.../e-42987
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 10 years ago
Just tested that approach and worked perfectly. Attaching it for your reference. In my case I didn't need a CAST since my column was already of type text.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
chandhinir
over 10 years ago
Hi Edurado,
I have used the above syntax but getting the error message as "The SQL Query is invalid, com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near the keyword \\'FROM\\'."
My query looks like below.
select columnname from table where instr(ac!id,concat("|",columnname,"|"))>0 .
please provide your suggestions
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
>