Skip to content

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 ​

ParameterTypeDescription
sqlQuerystringThe new SQL.

Examples ​

js
const sqlQuery = "SELECT * FROM products";
script.processUpdateQuery(sqlQuery);