To get data from the database with SQL statements or stored procedures, do the procedure in this topic.
Database Queries > SQL Command Screen
How to Start
- On the Organizer,
do one of these:
- Do one of these:
- Add an activity:
- In the Process Builder, go to the Activity Library, and
open the Database tab.
- On the Database tab,
drag the Query Record
activity onto your process.
- Change an activity:
- In your process, double-click your activity.
- Click
Query Record .
Procedure
- Complete the fields on the
General Configuration screen.
For more information, refer to
Configure General Options for a Database activity..
- To get the data from the database,
do one of these.
- To get the data with a SQL Command, do this procedure:
- On the Query Record screen, in the Database list, select your database access token.
To create a new access token, click
Add Token . For more information, refer to
New Database Access Token.
- In the Attribute Name and Queries field, click Add .
- On the Variable and Query screen, in the Attribute Name field, enter the name of the variable to store your data.
- In the Data Type list, select the data type of your attribute.
- In the Table Name list, select the name of your database table.
When you select the table name, the Column Name shows the name of the column.
- (Optional) In the Sql Select Query field, enter a SQL SELECT query to get your data.
You can drag the column names from the Column Name field to create your SQL SELECT query.
- To get data from the database with a stored procedure, do this procedure:
- On the Query Record screen, click the Stored Procedure tab.
- On the Stored Procedure tab, in the Database list, select your database access token.
To create a new access token, click
Add Token . For more information, refer to
New Database Access Token.
- In the Stored Procedure Name list, select your stored procedure.
- 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.
- 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.
- InputOuput - 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
|
- In the Data Type list, select the data type of the stored procedure parameter.
- In the Size field, enter the size of the input parameter for the stored procedure.