Creating a method wrapping for multiple SQL Queries

M3 Web Services supports multiple statements within the same method. This could be useful if, for example, you want to insert a row into a database table with a SQL insert, and then check that it got inserted correctly by following the insert with an SQL select.

  1. Perform steps 1 – 3 in section Creating a method wrapping for Single SQL Query. The SQL Editor is opened.
  2. Specify the SQL statements. The Statement input box supports multiple statements separated by a line break, like in this example.
  3. These queries do not require any variable input parameters so we only need to create a result set for the output. Click Output.

    The Output section is expanded.

  4. Click Add result set.

    The Result set data section is expanded.

    Note: The Length/Precision is optional, there is no reason why it must be specified on one result set and not the other in the example shown.