script.processUpdateQuery
Changes the SQL used by the process's datasource, for this run. Call it in begin(), such as to build the query from a prompt's answer. The datasource is read once begin() finishes, so calling it later, or in pre(), has no effect.
js
script.processUpdateQuery(sqlQuery)Parameters
| Parameter | Type | Description |
|---|---|---|
sqlQuery | string | The new SQL. |
Examples
js
const sqlQuery = "SELECT * FROM products";
script.processUpdateQuery(sqlQuery);