Creating a SQL Query
You can create your SQL query in two ways, by manually entering a query or accessing SQL Query Builder (if you have defined a database connection profile, you can use the Eclipse Data Tools Platform (DTP) SQL Query Builder to interactively define and, optionally, test the SQL query against the design-time target database).
If you are using Oracle PL/SQL to define a query you can use multiple INSERT, DELETE and UPDATE statements in a clause. For example:
BEGIN delete from BPMUSER.ORDERDETAILS; delete from BPMUSER.CUSTOMERDETAILS; delete from BPMUSER.MUSICCATALOGUE; END;
The use of multiple SELECT statements in this way is not supported.
Procedure
- Select the service task that you want to use to call the database.
- On the General tab of the Properties view, type the required SQL code directly in the SQL area in the right-hand pane.
- Select the service task that you want to use to call the database.
-
On the
General tab of the
Properties view, click the picker in the right-hand pane.
- If a system participant is already assigned to the database service task, and the system participant is mapped to a database connection profile, SQL Query Builder opens, using that database connection.
- If the assigned system participant is not mapped to a database connection profile, or if no system participant is assigned to the database service task, the
Connection Profile Selection
dialog is displayed.
Select the database connection profile that you want to use, then click OK. SQL Query Builder opens, using the selected database connection.
A system participant is also automatically created or updated and assigned to the database service task, as shown in the following table.