Consultor Eletrônico



Kbase 20794: Column Alias Not Supported in SQL-89
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/6/2009
Status: Unverified

SYMPTOM(s):

Utilizing SQL-89

Code will not compile

Trying to create a column alias

FACT(s) (Environment):

Progress 8.x
Progress 9.x

CAUSE:

Column aliases are not supported in SQL-89.

When a SELECT statement is run from the Procedure Editor, it accesses the SQL-89 engine.

The following code example produces a compilation error:

Select cust-num as cust from customer.

FIX:

Use a 'create view' statement and alias the columns through the column parameter in Procedure Editor. Follow these steps:

1) Create a view as follows:

CREATE VIEW custview(cust) AS SELECT cust-num
FROM customer.

2) Use the view to retrieve values:

SELECT cust FROM custview.