QuerySetJobID

Sets the Job ID for the SQL query.

Member of namespace

Maintenance Manager

Syntax

bool QuerySetJobID (string jobid)

Parameters

jobid
Type: string

Parameters

jobid: Job name. Smart parameters are supported.

Returns

True, if the query is successfully set. It does not mean that the query has been performed. Otherwise, True.

Level

Any level.

Details

When you are building a query, this action sets the job ID that is selected in the result set. If you want to match multiple job IDs, use commas to separate values. An exclamation point can be used to negate the query.
Example:
QuerySetJobID("Demo Job,Web Job")
ProcessRunSqlQuery("")

This example creates a result set that contains batches with job ID of Demo Job and Web Job.

QuerySetJobID("Demo Job")
QuerySetJobID("Web Job")
ProcessRunSqlQuery("")

This example creates an empty result set.

QuerySetJobID("!Demo Job")
ProcessRunSqlQuery("")

This example creates a result set that contains all batches except for the job ID of Demo Job.