ox-it / ords

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

'Edit query' button on dataset page does not always reproduce query faithfully #714

Open MerielP opened 9 years ago

MerielP commented 9 years ago

To reproduce this bug, view a dynamic dataset whose query contains an ORDER BY clause. Click the 'Edit query' button that appears at the top of the screen. Note that the ORDER BY clause doesn't appear on the SQL query page.

I haven't done a systematic check of which types of query don't appear properly, but a couple of examples are given below:

'SELECT m.id, p.title, p.first_name , p.surname , m.verbatim_name , c.club_name , m.joining_date , m.leaving_date FROM club_memberships m JOIN clubs c ON m.club_id = c.id JOIN people p ON m.people_id = p.id ORDER BY "surname" asc'

'SELECT "tblarticles"."title" AS "Title",(EXTRACT (YEAR FROM CURRENT_DATE))-"tblarticles"."year" AS "Years since publication" FROM "tblarticles"'