Alias
The alias statement is used for setting an alias according to which a field will be renamed whenever it occurs in the script that follows.
Syntax:
alias fieldname as aliasname {,fieldname as aliasname}
Arguments:
Argument | Description |
---|---|
fieldname | The name of the field in your source data |
aliasname | An alias name you want to use instead |
Examples with results
For the examples in the table below, the defined field name changes will be applied to references of the original field name on all subsequent SELECT and LOAD statements. A new alias can be defined for a field name by a new alias statement at any subsequent position in the script.
The field is also referenced with the alias name in the data model and app content.
Example | Result |
---|---|
Alias ID_N as NameID; |
Field ID_N is renamed to NameID. |
Alias A as Name, B as Number, C as Date; |
Fields A, B, and C are renamed to Name, Number, and Date respectively. |