If the alias name is specified as an identifier it should
conform to the following rules which are the rules defined for "Basic
Names" in ALLBASE/SQL:
When the alias name is specified as a single-quoted identifier
or as a double-quoted identifier, it can contain spaces and special
characters in addition to the characters allowed in the "Basic
Names" as defined above and the name can be up to 20 characters
in length. The alias name cannot be only spaces and it should not
be of zero length, i.e., it cannot be specified as '' or as '' ''.
# Column Alias cannot be used in sub-queries. (DBERR 1172)
— This error occurs when AS Clause is specified in
sub-queries.
# AS Clause cannot be used in the Select Statement of Create
View, Type 2 Insert or Genplan. (DBERR 1173)
— This error occurs when AS Clause is specified in
the Select Statement of Create View, Type 2 Insert or Genplan.
# Expected something between the single quotes. (DBERR 1174)
— This error occurs when the alias name is specified
as a single-quoted identifier and the identifier doesn't contain
any characters, i.e., the alias name is specified as ''
# Column Alias name cannot be only spaces. (DBERR 1175)
— This error occurs when the alias name is specified
as a single-quoted identifier or as a double-quoted identifier and
the identifier is made of only spaces.
# Column Alias Name cannot be used in the Select Statement
of Create View, Type 2 Insert or Genplan. (DBERR 1176)
— This error occurs when Alias Name is specified
in the Select Statement of Create View, Type 2 Insert or Genplan.