Article

Attempting to define a SQL View that uses the "ORDER BY" clause fails with a syntax error

Information

 
Article Number000064505
EnvironmentProduct: OpenEdge
Version: All supported versions
OS: All supported platforms
Other: SQL-92
Question/Problem Description
Attempting to define a SQL View that uses the "ORDER BY" clause fails with a syntax error.

Attempting to define a SQL View that uses the "ORDER BY" clause fails with errors -210056 / 10713

For example, 

SQLExplorer>CREATE VIEW sqlschema.salesrepsorted AS SELECT salesrep, region FROM pub.salesrep ORDER BY region;
=== SQL Exception 1 ===
SQLState=HY000
ErrorCode=-210056
[DataDirect][OpenEdge JDBC Driver][OpenEdge] Syntax error in SQL statement at or about "order by region " (10713)


Executing the SQL query specified in the View definition works as expected.
Steps to Reproduce
Clarifying Information
Error Message=== SQL Exception 1 ===
SQLState=HY000
ErrorCode=-210056
[DataDirect][OpenEdge JDBC Driver][OpenEdge] Syntax error in SQL statement at or about "order by region " (10713)
Defect/Enhancement Number
Cause
Use of the ORDER BY clause in a SQL View definition is not supported in versions of OpenEdge prior to 11.6.
Resolution
Upgrade to OpenEdge 11.6.
Workaround
In versions prior to 11.6, the ORDER BY clause has to be specified when running the View, e.g. 

SELECT * FROM sqlschema.salesrepsorted ORDER BY region;
Notes
Attachment 
Last Modified Date11/12/2015 2:09 PM


Feedback
 
Did this article resolve your question/issue?

   

Your feedback is appreciated.

Please tell us how we can make this article more useful. Please provide us a way to contact you, should we need clarification on the feedback provided or if you need further assistance.

Characters Remaining: 1025