google-code-export / ords

Automatically exported from code.google.com/p/ords
1 stars 0 forks source link

re-running saved query is failing due to the way the query interface splits queries #585

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Re-run a saved query via the Dataset List. In this case the query is: 
"select * from "city" WHERE population>1000000 order by "population" asc"
2. See that the query fails to run, giving the error "Unable to run query. 
Possible causes include malformed SQL, or a database error. Please check your 
query and try again. If you think you have discovered a problem with the ORDS 
system, please contact the help desk by emailing ords@it.ox.ac.uk
Message was: org.postgresql.util.PSQLException: ERROR: syntax error at or near 
"ORDER" Position: 73"
3. Realise that it has failed because of the way the query has been parsed and 
inserted into the following sections:
WHERE: population>1000000 order by "population" asc
ORDER BY: "population" asc

What is the expected output? What do you see instead?
I expect to see my query results. Unfortunately, the whole of the saved query 
beyond the 'WHERE' statement has been inserted into the WHERE field.

Please use labels and text to provide additional information.
App 1.0.6. in Chrome.

Original issue reported on code.google.com by jajwil...@gmail.com on 11 Dec 2014 at 1:47

GoogleCodeExporter commented 9 years ago

Original comment by marxjohn...@gmail.com on 15 Dec 2014 at 1:30