MicroStrategy ONE
Entering custom SQL statements for a data mart table
You can enter custom SQL statements for a data mart table. You can customize SQL statements to specify execution-related statements for a data mart report. This lets you include in your table definition any pre-creation or post-creation SQL statements you want to add.
You can only enter custom SQL statements if you have the Use SQL Statements tab in Datamart/Bulk Export editors privilege in Developer Designer privileges.
For an introduction to data marts and examples, see the Advanced Reporting Help.
To enter custom SQL statements for a data mart table
-
If the Report Data Mart Setup dialog box is not displayed, open it. For steps to open it, see Data mart tools: Report Data Mart Setup dialog box.
-
Select the SQL Statements tab. The SQL Statements dialog box opens.
-
If you want custom SQL statements to use cached data, select Use cached connections for Pre- and Post-SQL.
-
Enter the SQL statements to be executed as described below:
-
Enter pre-table-creation statements immediately before the CREATE TABLE statement.
-
Enter post-table-creation statements immediately after the CREATE TABLE statement and before the INSERT statement.
-
Enter insert statements immediately after the INSERT statement.
Custom SQL statements should be separated by semi-colons.
-
-
Click OK to exit the dialog box when you are done.
Placeholders
You can use the following placeholders within your custom SQL statements:
Placeholder |
Replacement |
!!! |
All column names |
??? |
Data mart table name |
!! |
Exclamation (!) |
!!= |
Not equal to (!=) |
!a |
Attribute column names only |
!u |
User name |
!d |
Table creation date |
!o |
Report name |
!t |
Timestamp |
!p |
Project name |
!j |
Job ID |
!r |
Report GUID |
!z |
Project GUID |
!s |
User session GUID |