Identifier naming conventions
The name of a table or column is known as its identifier. An object's identifier is created when the object is defined. There are two classes of identifier, both of which must contain from 1 to 128 characters.
Regular identifiers
Regular identifiers conform to the rules for the format of identifiers: see
Rules for regular identifiers.
Regular identifiers are not delimited when they are used in SQL statements.
SELECT *
FROM VDATA
WHERE Respondent.Serial = 124
Delimited identifiers
Delimited identifiers are enclosed in either " " (double quotation marks) or [ ] (brackets). Identifiers that comply with the rules for the regular identifiers might or might not be delimited.
SELECT *
FROM [VDATA] --Delimiter is optional.
WHERE [Respondent.Serial] = 124 --Delimiter is optional.
Identifiers that do not comply with all of the rules for regular identifiers must be delimited in a statement.
SELECT *
FROM [My Summary] --Identifier contains a space.
WHERE [order] = 10 --Identifier is a reserved keyword.
To include " (double quotation mark) or ] (end bracket) in a delimited identifier, use two consecutive quotation mark or two end bracket characters.
This example shows using two consecutive end brackets as an escape sequence for a column named rating[{Dinosaurs}].Grid, which contains brackets:
SELECT *
FROM VDATA
WHERE [rating[{Dinosaurs}]].Grid] = 10
This example shows using two consecutive double quotation mark characters as an escape sequence for a column named "products", which contains double quotation marks:
SELECT *
FROM VDATA
WHERE [""products""] = 10
Column names generated by the UNICOM Intelligence Data Model frequently contain brackets. It is therefore recommended that, in programs, you enclose delimited identifiers in double quotation marks rather than brackets.
See also