Write multiple rows in database from process

Hello,

Is there a way to insert/update multiple rows ( from an array process variable) using "Query Database" or "Stored Procedure" nodes, but without generating one instance for each row to be inserted/updated?

Thank you.

  Discussion posts and replies are publicly visible

Parents
  • Hi Oanas,

    As other practitioners said, Write to Multiple Datastore is best option.

    But ,If you want to use only Query Database or Stored Procedure, then go with Stored Procedure.
    When you call Stored Procedure in your process, pass your array process variable as an xml (convert your array process variable to XML) or string (convert your array process variable to string) and then pass to your stored procedure and in your stored procedure split that string/XML and use looping to insert/update multiple rows in target table.
Reply
  • Hi Oanas,

    As other practitioners said, Write to Multiple Datastore is best option.

    But ,If you want to use only Query Database or Stored Procedure, then go with Stored Procedure.
    When you call Stored Procedure in your process, pass your array process variable as an xml (convert your array process variable to XML) or string (convert your array process variable to string) and then pass to your stored procedure and in your stored procedure split that string/XML and use looping to insert/update multiple rows in target table.
Children
No Data