INC-218491 · Issue 717432
Removed ORDER BY clause duplication when using MSSQL
Resolved in Pega Version 8.7.2
After updating from Pega 8.4 to Pega 8.7, executing the query for the report definition generated the error "SQLServerException: Incorrect syntax near the keyword 'ORDER'." Investigation showed the ORDER BY clause was added to the Native SQL query from the standard dataflow background task and from the native SQL API as well when using an MSSQL database. This has been resolved by adding changes to restrict the order by clause if the SQL query has order by clause already for MSSQL.