Communicator e3000 MPE/iX Release 7.5 (Software Release C.75.00) (30216-90336)

Chapter 5
Technical Articles
AS Clause Enhancement in ALLBASE/SQL
119
The name can be up to 20 characters in length.
The name can be made of any combination of letters (a to z, A to Z), decimal digits (0 to 9), $, #, @, or
underscore (_). The first character cannot be an underscore or a decimal digit
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 '' ''.
NOTE Key word FROM can be used as Column alias name, only when it is enclosed within Quotes
(FROM).
=========
EXAMPLE
=========
SELECT COL1 FROM FROM TABLE; (Not Allowed)
SELECT COL1 "FROM" FROM TABLE; (Allowed)
Constraints
1. The alias name cannot be used in the other clauses of the query.
2. Column Alias Name cannot be used in sub-queries because the sub-query result is not returned to the
user and hence the alias name doesnt have any significance here.
3. Column Alias Name cannot be used in the Select Statement of Create View, Type 2 Insert or Genplan
because it doesnt have any significance here.
New Error Messages
# 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 doesnt
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.