The wildcard !j is used by the Strategy Engine to display the Job ID. Refer to the following Strategy Knowledge Base article for information regarding SQL generation wildcards that are implemented in Strategy Engine:
KB10940 - What SQL generation wildcards are implemented in Strategy Engine?
Typical usages of this wildcard includes SQL Hints, pre/post SQL statements etc. Following is an entry from the SQLSTATEMENT in the IS_REP_SQL_STATS table showing that the !j wildcard returns a value of 0 (instead of the actual Job ID when used in a SQL Hint (as /* jobid:!j */):
/* jobid:0 */
Here are two possible circumstances where this happens:
- Reports involving Drilling in Web
For example, let's say user runs a report in Web. User then performs a drilling operation on that report. The drilled job does have a new Job ID associated with it, however the wildcard !j does not show this Job ID - instead it shows 0. The following SQL may be used to obtain records from Statistics tables for a list of jobs where !j returned 0 due to drilling operation in Web (note the LIKE qualifier below is for the SQL Hint mentioned above):
SELECT * FROM IS_REP_SQL_STATS WHERE SQLSTATEMENT LIKE '%jobid:0%' AND JOBID IN (SELECT JOBID FROM IS_REPORT_STATS WHERE DRILLINDICATOR = 1)
-
The DRILLINDICATOR field in IS_REPORT_STATS table may be used as a qualifying filter for those records.
- Reports that are contained within a Report Services Document and user executes the document
When user runs a document, the dataset reports are submitted as child jobs and statistics are recorded about these jobs in the corresponding report Statistics tables (such as IS_REPORT_STATS, IS_REP_SQL_STATS, IS_REP_STEP_STATS etc.). Information about the document job is recorded in the document Statistics tables (such as IS_DOC_STATS, IS_DOC_STEP_STATS). The following SQL may be used to obtain records from Statistics tables for a list of jobs where !j returned 0 due to execution as part of the Report Services document (note the LIKE qualifier below is for the SQL Hint mentioned above):
SELECT * FROM IS_REP_SQL_STATS WHERE SQLSTATEMENT LIKE '%jobid:0%' AND JOBID IN (SELECT JOBID FROM IS_REPORT_STATS WHERE PARENTINDICATOR = 1)
-
The PARENTINDICATOR field in IS_REPORT_STATS may be used as a qualifying filter for those records.