Consultor Eletrônico



Kbase 17772: Using Column Alias in Apptivity
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   09/03/2000
Using Column Alias in Apptivity

When building SQL queries that join multiple tables, Apptivity cannot
resolve references to two fields with the same name in a data source.

If you attempt to do so, you will see the following error:
The Data Source contains two columns with the same name: FieldName
It is not being added to the project. you can use a Column Alias to
qualify the duplicate column name or entry.

It is possible to implement the SQL COLUMN-ALIAS to work around this.
You can define a Column Alias (similar to correlation names) using
the following syntax when referring to a column:
tablename.fieldname AS name_of_alias

For example:

SELECT Suppliers.SupplierID, Suppliers.CompanyName,
Products.SupplierID
FROM Suppliers, Products

will not save in the Query Editor. The following statement will:

SELECT Suppliers.SupplierID, Suppliers.CompanyName,
Products.SupplierID AS SuppID
FROM Suppliers, Products

NOTE: Column-aliases are part of SQL92. Progress Version 9 is SQL92 compliant; earlier versions of Progress are not (Progress Version 8 is SQL89 compliant).
Therefore you will not be able to use column-aliases with any Progress version earlier than V9.


PES (03/16/98)
PES (03/13/98)

Progress Software Technical Support Note # 17772