The statement with this error is invalid
select xxx from aaa order by xxx
union all
select yyy from bbb order by yyy
The reason for the error is that if you use union all and order by at the same time, the clause of union all needs to add brackets
So the following writing will not be reported error
(select xxx from aaa order by xxx)
union all
(select yyy from bbb order by yyy)
Similar Posts:
- Hive SemanticException:Expression not in GROUP BY
- Oracle error: not a group by expression [How to Solve]
- Error: not a group by expression [How to Solve]
- C# Unable to translate set operation when matching columns on both sides have different store types
- MYSQL Error: Invalid use of group function [How to Solve]
- [Err] 1055 – Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated c
- [Solved] MySQL ERROR 1054 (42S22): Unknown column ‘i2goods.t_ebook_data.fbookid’ in ‘field list’
- You can’t specify target table for update….
- [Solved] Postgre Error: ERROR: UNION types numeric and character varying cannot be matched
- 12 Methods of SQL Error Injection [How to Inject]