Syntax
Object |
Syntax |
Example |
---|---|---|
Session key |
|
|
Parameter map key |
|
|
Parameter map entry whose key is defined by a session parameter |
|
|
You can add the following elements to further define the macro expression.
Symbol |
Purpose |
---|---|
Single quotation marks ' |
Delineates a literal string that has a single quotation mark as part of the string. If the single quotation
mark displays in a string, such as a query item, the string must be
enclosed in a single quotation mark on both sides of the string and
the single quotation mark must be doubled. For example, ab'c is written
as If the single quotation mark
displays in a macro, the string must be enclosed in square brackets.
For example, ab'c is written as If the single quotation mark displays in a prompt, there is no need to enclose the string. To escape a single quotation mark in an
expression, use |
Square brackets [ ] |
Encloses model objects, such as a namespace or query subject and macro names that contain restricted characters, such as a number sign, hyphen, or space. |
Curly brackets, also known as braces { } |
Calls a function that is unknown to the parser, such as Example:
|
+ operator |
Concatenates two strings, such as |
Single quote function (sq) |
Surrounds the result of a string expression with single quotation marks. If the single quotation mark displays in a string, such as a query item, the string must be enclosed in a single quotation mark on both sides of the string and the single quotation mark must be doubled. You can use this function to build clauses to test against literal parameter-driven values. Here is an example: If a session parameter (my_sp) has the value ab'cc, the result is
|
Double quote function (dq) |
Surrounds the result of a string expression with double quotation marks. You can use this function to refer to table and column names with non-identifier characters, such as a blank space or a percent sign (%). Here is an example: If runLocale=en-us, the result is
|
Square bracket function (sb) |
Inserts a set of square brackets into the argument to build object references in a model query and model expressions, such as filters and calculations. Here is an example: If runLocale=en-us, the result is
|