EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics
  3. KB10940: What SQL generation wildcards are implemented in MicroStrategy Engine?

KB10940: What SQL generation wildcards are implemented in MicroStrategy Engine?


Community Admin

• Strategy


This article describes the wildcards MicroStrategy has for use in SQL generation.
Starting with the release of MicroStrategy ONE (March 2024), dossiers are also known as dashboards.
A wildcard is a character, or set of characters, reserved by the MicroStrategy Engine that will be replaced by a value determined at a report's run-time. The following table lists SQL generation wildcards available in MicroStrategy 10.x and their corresponding replacement values in SQL generation:
 

Wildcard

Replacement Value

!u

user name

!o

report name

!d

date

???

temporary table name

!!!

all column names

!a

attribute column names

!j

job ID

!r

report GUID

!t

timestamp

!p

project name

!z

project GUID

!s

user session GUID

The following table lists how wildcards can be used:

Applicable Usages

Wildcards supported in 10.x

Report Pre Statement

!d, !o, !u, !j, !r, !t, !p, !z, !s

Table Pre Statement

!d, !o, !u, !!!, !a, ???, !j, !r, !t, !p, !z, !s

Create Post String

!d, !o, !u, !j, !r, !t, !p, !z, !s, !!!, !a, ???

Insert Pre Statement

!d, !o, !u, !!!, !a, ???, !j, !r, !t, !p, !z, !s

SQL Hint

!d, !o, !u, !j, !r, !t, !p, !z, !s

Insert Post String

!d, !o, !u, !j, !r, !t, !p, !z, !s, !!!, !a, ???

Insert Post Statement

!d, !o, !u, !!!, !a, ???, !j, !r, !t, !p, !z, !s

Insert Mid Statement

!d, !o, !u, !!!, !a, ???, !j, !r, !t, !p, !z, !s

Index Post String

!d, !o, !u, !j, !r, !t, !p, !z, !s, !!!, !a, ???

Table Post Statement

!d, !o, !u, !!!, !a, ???, !j, !r, !t, !p, !z, !s

Select Post String

!d, !o, !u, !j, !r, !t, !p, !z, !s

Report Post Statement

!d, !o, !u, !j, !r, !t, !p, !z, !s

Cleanup Post Statement

!d, !o, !u, !j, !r, !t, !p, !z, !s

Datamart Insert SQL

???, !d, !o, !u, !j, !r, !t, !p, !z, !s, !!!, !a

Datamart Pre SQL

???, !d, !o, !u, !j, !r, !t, !p, !z, !s, !!!, !a

Datamart Post SQL

???, !d, !o, !u, !j, !r, !t, !p, !z, !s, !!!, !a

Datamart Pre Create SQL

???, !d, !o, !u, !j, !r, !t, !p, !z, !s, !!!, !a

Datamart Post Create SQL

???, !d, !o, !u, !j, !r, !t, !p, !z, !s, !!!, !a

Datamart Pre Insert SQL

???, !d, !o, !u, !j, !r, !t, !p, !z, !s, !!!, !a

Datamart Table Name

!d, !o, !u, !j, !r, !t, !p, !z, !s

 

NOTE:

1. Starting MicroStrategy 10.6, an additional wildcard is available which displays the folder path of the report being executed:

!f    

  folder path of the report  

This wildcard can be used in all Pre/Post statements except for Element Browsing Pre/Post statements.
2. Starting MicroStrategy 11.0, an additional SQL generation wildcard is available which the displays the job priority of the report being executed:

!i

Job priority of the report

This wildcard can be used in all Pre/Post SQL statements. Note that both lower case (!i) and upper case (!I) can be used in this SQL generation wildcard just like all other letter based SQL generation wildcards. Also note that this SQL generation wildcard is resolved in the Query Engine (after report execution), so the !i will not be replaced until after the report has been executed.
Read more: KB442295 : New SQL Generation Wildcard (!i) for Job Priority


3. Starting MicroStrategy 11.0 release, following wild cards are now resolved in Query Execution phase and not in SQL Generation phase. So, any report's SQL view (without executing it first) will not show the resolved wild cards. These wild cards will be resolved in Query Execution phase and will have no functionality impact on the report execution. Since Integrity manager compares the SQL before execution, it may report SQL failure between base and target reports for report/document/dossier with wildcard during integrity manager comparison test. However, this failure can be ignored if the user confirms it's caused by a wildcard usage.

!d

!j

!t

!s

!i

!u

!p

!z


4. Starting in MicroStrategy 2021, the following wild cards are allowed if the user is using TPT API. 
 

Wildcard

Replacement Value

!u

user name

!o

report name

!d

date

!j

job ID

!t

timestamp

!s

user session GUID

!i

job PU ID

!p

Project name

!z

Project Id

!r

report GUID

!f

report path 


Using wildcards in TPT API parameters will help users better utilize Query Band and set up the proxy user based on MicroStrategy login. For more information about TPT API, please refer to Connect via API. 

Comment

0 comments

Details

Knowledge Article

Published:

March 21, 2024

Last Updated:

March 21, 2024