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
7 replies
Subscribers
7 subscribers
Views
4528 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
Query Database Smart Service
jurim409
A Score Level 1
over 7 years ago
Hi,
I need to use a Query Database Smart Service to update many rows in my table.
I need to replicate the following query:
update [table] set [column1]=1 where [column2] in ('A','B');
A and B will be my values in the process variable. I would find a method to do it without running a multiple istances.
Do you know another methods?
Thanks in advance.
OriginalPostID-255471
Discussion posts and replies are publicly visible
Top Replies
Venu
over 7 years ago
+1
@Jurim409, I think your A & B values will come form process variables. You need to convert the array values to single text value using joinarray function. Joinarray(pv!array,","), map this logic to you…
Parents
0
Sachin
A Score Level 1
over 7 years ago
@jurim for your scenario for updating the multiple columns you can use store procedures,
for example
create procedure
[procedure name]
( input1 IN,input2 IN)
BEGIN,
UPDATE TABLE1 SET COLUMN1=1 WHERE COLUMN2 IN (input1,input2);
COMMIT;
END;
and execute this by using executestoredprocedure function
hope this is helpfull
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
Sachin
A Score Level 1
over 7 years ago
@jurim for your scenario for updating the multiple columns you can use store procedures,
for example
create procedure
[procedure name]
( input1 IN,input2 IN)
BEGIN,
UPDATE TABLE1 SET COLUMN1=1 WHERE COLUMN2 IN (input1,input2);
COMMIT;
END;
and execute this by using executestoredprocedure function
hope this is helpfull
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data