Put More than One Record into a Database Table

To put more than one database record in a database table, do the procedure in this topic.

Screen



Screen



Good to Know

How to Start

  1. On the Application Explorer screen, do one of these:
  2. Do one of these:
    • Add an activity:
      1. In the Process Builder, go to the Activity Library, and open the Database Database icon tab.
      2. On the Database Database icon tab, drag the Batch Insert Batch Insert icon activity onto your process.
    • Change an activity:
      1. In your process, double-click your activity.
  3. Click Batch Insert Batch Insert icon.

Procedure

  1. To put the data in a database table, do one of these.
    • To put the data into a specified table:
      1. On the Batch Insert screen, in the Specific Table tab, in the Database list, select your database access token.

        To create a new access token, click Add Token Add Token icon. For more information, refer to Access Token for Database.

      2. In the Repeating Node field, enter an Xpath that specifies the root of a repeating element in a schema where all the data is stored.
      3. (Optional) In the Schema list, select your database schema.
      4. In the Table Name list, select your database table.
      5. (Optional) Complete these fields as necessary:
        Field Name Definition

        Remove All Old Records

        Function:
        Removes all the old records from the database.
        Accepted Values:
        • Selected - Enables the remove all old records option.
        • Deselected - Removes the record that satisfy the specified condition.
        Default Value:
        Deselected

        Before insert, remove records that meets following conditions

        Function:
        Removes the records from the database that satisfies the specified condition. This remove operation is performed before the insert operation.
        Accepted Values:
        A valid SQL condition after WHERE clause.
        Default Value:
        None
        Accepts Process Data Variables:
        Yes
        Example:
        InvoiceNumber < 1467
      6. In the Column Name field, enter the name of the column to put the data.
      7. In the Value field, enter your value, or drag a process data variable from the Process Data screen.
      8. (Optional) Click Create Create icon to add a new row to add a variable or value.
    • To insert the data with a stored procedure:
      1. On the Batch Insert screen, click Stored Procedure tab.
      2. On the Stored Procedure tab in the Database list, select your database access token.

        To create a new access token, click Add Token Add Token icon. For more information, refer to Access Token for Database.

      3. In the Repeating Node field, enter an Xpath that specifies the root of a repeating element in a schema where all the data is stored.
      4. In the Stored Procedure field, select your stored procedure.
      5. In the Value/Attr. Name field, enter the value of the stored procedure parameter, or drag a process data variable from the Process Data screen.
      6. To specify the input and output options for the stored procedure, complete this field as necessary.
        Field Name Definition

        in/out.

        Function:
        Specifies the in/out parameters for the stored procedure.
        Accepted Values:
        • Input - Specifies that the parameter is an input value for the stored procedure.
        • Output - Specifies that the parameter is an output value for the stored procedure.
        • InputOutput - Specifies that the parameter can be input/output value for the stored procedure.
        • ReturnValue - Specifies that the parameter is a return value for the stored procedure.
        Default Value:
        None
        Accepts Process Data Variables:
        No
      7. In the Data Type list, select the data type of the stored procedure parameter.
      8. In the Size field, enter the size of the input parameter for the stored procedure.