Dear all, I am trying to update some columns in a DB using a Query Da

Dear all,

I am trying to update some columns in a DB using a Query Database Smart Service Task and I need to use the IN wildcard for the WHERE clause. Typically in my mind it should look like this UPDATE mytable SET row = 0 WHERE id IN (ac!oneVariable). The ac!oneVariable is a number(integer) MULTIPLE came from a process variable updated in a User Task. By implementing the above mentioned approach I get some weird alerts which I think are generated from hibernate : There was a problem executing the SQL query. SQL Message : [Ljava.lang.Long; cannot be cast to java.lang.Long Problem: An error occurred in executing an Activity Class.

I also tried to "inject" the contents of the pv!oneVariable in a text activity class having value: joinarray(pv!oneVariable, '","') but without any success.

Could you please help me with the best practices with this regard?

Thanks in advance,
Octavian

OriginalPostID-183225

OriginalPostID-183225

  Discussion posts and replies are publicly visible

Parents
  • HI Octav,

    i am facing the similar issue,
    i need to select two columns from View and used where clause, in operator,
    here the values for In operator comes from acp.

    SELECT DISTINCT
    status,ftn_Id
    FROM
    schema.my_view
    WHERE service IN ('service1','service2')
    AND INSTR(ac!ftn_Id, CONCAT(',', ftn_Id, ',')) > 0
    AND ROWNUM =1

    i am using Oracle.

    Any suggestions.
Reply
  • HI Octav,

    i am facing the similar issue,
    i need to select two columns from View and used where clause, in operator,
    here the values for In operator comes from acp.

    SELECT DISTINCT
    status,ftn_Id
    FROM
    schema.my_view
    WHERE service IN ('service1','service2')
    AND INSTR(ac!ftn_Id, CONCAT(',', ftn_Id, ',')) > 0
    AND ROWNUM =1

    i am using Oracle.

    Any suggestions.
Children
No Data