Feedback
Did this article resolve your question/issue?

   

Article

The default ORDER BY direction (ASC|DESC) is incorrect with OpenAccess

Information

 
TitleThe default ORDER BY direction (ASC|DESC) is incorrect with OpenAccess
URL Name8848
Article Number000125746
EnvironmentProduct : Progress DataDirect OpenAccess Server and IP SDK
Version : 7.0
Database : NA
OS : All supported platforms
Application : All supported applications
Question/Problem Description
If ORDER BY Clause does not have explict ASC|DESC ordering, the default is to use ASC. In the current implementation, if one of the ORDER BY elements has ASC|DESC ordering, OpenAccess will use it as the default for the next ORDER BY element.
Steps to Reproduce
Clarifying Information
Steps to Reproduce: Select col1,col2 from tablename order by col1 desc , col2 .

Current Behaviour :
Col1 is in Desc Order
Col2 is in Desc Order

Expected Result :
Col1 should be in Desc Order
Col2 should be in Asc Order
Error Message
Defect NumberEnhancement DD00059520
Enhancement Number
Cause
Resolution
Enhancement request DD00059520 has been implemented.

Upgrade to OpenAccess SDK 7.0 GA or later. When ASCE|DESC is not specified explicitly then ASC is used by default.

Fixed in OpenAccess SDK 7.0. Refer to “OpenAccess SDK hot fix download and install instructions” for instructions on how to download and install the hot fix.
Workaround
ASC|DESC for all ORDER BY elements should be explicitly specified: 

'select p_size, p_partkey from part oder by p_size desc, p_partkey asc'
Notes
Last Modified Date7/29/2019 5:15 PM
Files
Disclaimer The origins of the information on this site may be internal or external to Progress Software Corporation (“Progress”). Progress Software Corporation makes all reasonable efforts to verify this information. However, the information provided is for your information only. Progress Software Corporation makes no explicit or implied claims to the validity of this information.

Any sample code provided on this site is not supported under any Progress support program or service. The sample code is provided on an "AS IS" basis. Progress makes no warranties, express or implied, and disclaims all implied warranties including, without limitation, the implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample code is borne by the user. In no event shall Progress, its employees, or anyone else involved in the creation, production, or delivery of the code be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample code, even if Progress has been advised of the possibility of such damages.