[SQL Server] Get Value
Q100112: [SQL Server] Get Value
Executes a SQL command on specified SQL Server and returns a singular value.
Parameter | In/Out | Description | Other Info |
---|---|---|---|
DB connection | In | Assign a defined SQL Server Connection or directly enter the parameters and values which make up a valid connection for SQL Server . |
Connection type: sysSqlServer |
SQL command | In | SQL statement or command(s) to be executed. | |
Command timeout seconds | In | Timeout in seconds for the command to execute. Default is 0 seconds, the same as SSMS, which will wait indefinitely. | Default: 0 |
Run within transaction | In | When true will execute the SQL command within a transaction. | Default: true |
Log output level | In | Choices: Minimal , Verbose The level of execution detail you want to appear in the log. |
Default: Minimal |
Execution output | Out | Text returned by PRINT statements in SQL being executed. | |
Value | Out | Value of the first row and column returned by the SQL statement. |
(Italics = required parameters)
Notes
The [SQL Server] Get Value
module is used to run any type of SQL query on a Microsoft SQL Server
database, and return a single value that is directly accessable to the running job as a output parameter, named Value
. An example might be to run a query to return the items of a specific status and get a count or percentage for the items and use that to create a job which can take actions on that when it crosses a critical threshold.
This module is built specifically for quickly getting a singular result into an output parameter which can be directly accessed immediately in the next step(s). If you are working with a fair amount more of data, then other options are available in other [SQL Server]
modules that are more efficient for multiple values or entire sets of results. See [SQL Server] Export
for many more powerful options for larger amounts of data.