uwescience / sqlshare

Documentation and help for the SQLShare project
escience.washington.edu/sqlshare
7 stars 2 forks source link

What limits are reasonable for the queries that become datasets? #67

Open vegitron opened 9 years ago

vegitron commented 9 years ago

(Question for SQLSHR-235)

If you have this query:

SELECT (1) a, (2) b ORDER BY b

and want to make a dataset out of it, you'll get this error:

('42000', '[42000] [FreeTDS][SQL Server]The ORDER BY clause is invalid in views, inline functions, derived tables, subqueries, and common table expressions, unless TOP, OFFSET or FOR XML is also specified. (1033) (SQLExecDirectW)')

On production, that effort will just get you this:

Error!

There was an error loading your query.

Should we be trying to parse that into a query that can be turned into a view? Would simply dropping 'order by ([\w, ]+)$' by sufficient, or is this opening up a can of worms?