How to update a column value of multiple records in a table?

Scenario:

Update Column "X" in table "A" for an array of record identifiers of records in table "A". Value will be same value for all the list of record identifiers in their column "X".

Is this possible to achieve? If yes, how to do it, please share recipe or sample code.

  Discussion posts and replies are publicly visible

Parents
  • I would suggest querying for the rows of table A by IDs. Then use updatecdt() to populate column X with the value, and then use an a!writeToDataStoreEntity() to write it back to the database.

    If this is a one time change, you could do so using update scripts on your database directly. If it is a more complicated use-case, you could do the same through a process model as well, but I would suggest working directly on the DB level or on an interface.
Reply
  • I would suggest querying for the rows of table A by IDs. Then use updatecdt() to populate column X with the value, and then use an a!writeToDataStoreEntity() to write it back to the database.

    If this is a one time change, you could do so using update scripts on your database directly. If it is a more complicated use-case, you could do the same through a process model as well, but I would suggest working directly on the DB level or on an interface.
Children