Symptom
- Error 325 is raised when a SELECT query contains UNION ALL and ORDER BY clause:
Msg 325, Level 18, State 1:
Line 1:
Adaptive Server finds no legal query plan for this statement. If an Abstract Plan is forcing the query plan, check its correspondence to the query. If not, please contact SAP Technical Support.
- The query structure is similar to:
SELECT DISTINCT
...
FROM
db1..t1,
db1..t2
WHERE
...
UNION ALL
SELECT DISTINCT
...
FROM
db1..t1,
db1..t2
WHERE
...
GROUP BY
...
ORDER BY
t2.col2 DESC
- The error does not occur when using:
-
UNION ALL but no ORDER BY
- UNION with or without ORDER BY
Read more...
Environment
-
SAP Adaptive Server Enterprise (ASE) 15.7 SP139
-
SAP Adaptive Server Enterprise (ASE) 16 SP03
Product
SAP Adaptive Server Enterprise 15.7 ; SAP Adaptive Server Enterprise 16.0
Keywords
CR811815, CR#811815, 811815 , KBA , BC-SYB-ASE , Sybase ASE Database Platform (non Business Suite) , Bug Filed
About this page
This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).Search for additional results
Visit SAP Support Portal's SAP Notes and KBA Search.