Query Database Smart Service

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

Parents
  • @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 ACP (which can be used in sql Query).

    example query: SELECT column1 FROM schema.mytableWHERE INSTR(','||ac!value||',', ','||column1||',')>0
    Here ACP (ac!value is single type)

    Have a look at this news event: https://forum.appian.com/suite/tempo/entry/e-180895

Reply
  • @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 ACP (which can be used in sql Query).

    example query: SELECT column1 FROM schema.mytableWHERE INSTR(','||ac!value||',', ','||column1||',')>0
    Here ACP (ac!value is single type)

    Have a look at this news event: https://forum.appian.com/suite/tempo/entry/e-180895

Children
No Data