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

error using select * from X order by Y where Z [CORE2953] #3335

Closed
firebird-automations opened this issue Mar 31, 2010 · 4 comments
Closed

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Leslie Kaye (leskaye)

This statement
select * from NOMINAL_LEDGER where NOMINAL_CODE = ? order by NOMINAL_CODE
works as expected

This statement
select * from NOMINAL_LEDGER order by NOMINAL_CODE where NOMINAL_CODE = ?
returns "Dynamic SQL Error SQL error code = -104 Token unknown - line 2, column 23 where"

It seems that "order by" cannot be used before "where". This gives a problem with TSQLTable generated SQL in Delphi 2006

@firebird-automations
Copy link
Collaborator Author

Modified by: Leslie Kaye (leskaye)

summary: error using select 8 from X order by Y where Z => error using select * from X order by Y where Z

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

ORDER BY clause *is really* (and *by design*) cannot be used before WHERE. This is the standard SQL syntax. Blame your toolset for ignoring such a well-known rule.

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Won't Fix [ 2 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

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