Actions - SQL Update
Overview
The SQL Update Action item executes a query that updates data. Ideally a Stored Procedure is created which is then executed from the Action using a small SQL statement.
Steps
Info
The Input Parameters that can be used in the SQL differ based on the module that the Action is linked to. The parameter list can be found in the left panel of the SQL Editor.
- Add an item to the Action.
- In the Type column, select SQL Update.
- Add a Description for reference purposes.
- Right-click the item and select Edit SQL.
- Click Template (button) to generate the basic SQL required for this Action item.
SQL Template
Info
The template depends on the module that the Action is linked to.
| Linked to | Template |
|---|---|
| Not linked | execute procedure [PROCEDURE_NAME](:ACTIVEUSERID) |
| A Transaction Type | execute procedure [PROCEDURE_NAME](:TRANSID, :ACTIVEUSERID) |
| A Workflow | execute procedure [PROCEDURE_NAME](:WORKFLOWID, :ACTIVEUSERID) |
| A Tracker | execute procedure [PROCEDURE_NAME]([:USERFIELD_NAME1], [:USERFIELD_NAME2], :ACTIVEUSERID) |
| A Report | execute procedure [PROCEDURE_NAME](:ACTIVEUSERID) |