Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL Server doesn't support referencing column aliases in ORDER BY clause expressions #3575

Open
lukaseder opened this issue Aug 20, 2014 · 0 comments

Comments

@lukaseder
Copy link
Member

SQL Server doesn't support referencing column aliases from the SELECT clause in ORDER BY clause expressions. While this works:

select title a
from t_book
order by a asc

This doesn't:

select title a
from t_book
order by a + 'a' asc

jOOQ should prevent aliases from being rendered in ORDER BY clauses for SQL Server.

Other databases may be affected too, e.g. H2 and Derby

@lukaseder lukaseder added this to the Version 3.5.0 milestone Aug 20, 2014
lukaseder added a commit that referenced this issue Aug 20, 2014
- [#2080] Syntax error in rendered SQL when using limit().offset() with aliased projections in SQL Server
- [#3575] SQL Server doesn't support referencing column aliases in ORDER BY clause expressions
@lukaseder lukaseder reopened this Aug 20, 2014
lukaseder added a commit that referenced this issue Aug 20, 2014
@lukaseder lukaseder removed this from the Version 3.11.0 milestone May 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant