Kbase P122776: SQL-92: Error (10713) or (7587) executing CREATE VIEW statement with an ORDER BY clause.
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  3/12/2007 |
|
Status: Unverified
FACT(s) (Environment):
Progress 9.1x
OpenEdge 10.1A
SYMPTOM(s):
SQL-92: Error (10713) or (7587) executing CREATE VIEW statement with an ORDER BY clause.
OpenEdge 10.1A Error:
=== SQL Exception 1 ===
SQLState=HY000
ErrorCode=-210056
[DataDirect][OpenEdge JDBC Driver][OpenEdge] Syntax error in SQL statement at or about "ORDER BY custnum) " (10713)
Progress 9.1x Error:
=== SQL Exception 1 ===
SQLState=42000
ErrorCode=-20003
[JDBC Progress Driver]:Syntax error (7587)
Executing a statement similar to:
CREATE VIEW myview ( myfield ) AS SELECT custnum FROM PUB.customer ORDER BY custnum;
CAUSE:
The SQL-92 standard does not allow the use of the ORDER BY clause with the CREATE VIEW statement.
FIX:
Remove the ORDER BY clause from the CREATE VIEW statement and perform the sorting when executing the SELECT statement against the newly created view. For example:
SELECT * FROM myView ORDER BY myfield;