Query Database Passing a parameter using IN Condition

Hi All,

Did anyone tried passing the parameter as in condition for a query database smart service

For example : update tablename set status="test1" where case_id in ac!caseId

How to pass the case ID values of multiple and what is the type of the parameter for this?

  Discussion posts and replies are publicly visible

Parents
  • 0
    A Score Level 2
    5 months ago

    If you are using mysql, then you can use a query like:

    UPDATE tablename  SET status="test1" WHERE FIND_IN_SET(case_id, ac!caseId)

    and the ac!caseId can be set to:

    joinarray(pv!caseIds, ",") 

    where pv!caseIds can be your case id's (I assumed its of type number integer - multiple)

Reply
  • 0
    A Score Level 2
    5 months ago

    If you are using mysql, then you can use a query like:

    UPDATE tablename  SET status="test1" WHERE FIND_IN_SET(case_id, ac!caseId)

    and the ac!caseId can be set to:

    joinarray(pv!caseIds, ",") 

    where pv!caseIds can be your case id's (I assumed its of type number integer - multiple)

Children