[
https://issues.apache.org/jira/browse/DERBY-4397?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dag H. Wanvik updated DERBY-4397:
---------------------------------
Attachment: derby-4397-insert-from-exists.stat
derby-4397-insert-from-exists.diff
Uploading an experimental patch (derby-4397-insert-from-exists) which
- incorporate the revamped patch for DERBY-4
- adds ORDER BY to FromSubqueries
- adds ORDER BY to EXISTS/NOT EXISTS subqueries
- adds test cases to the above as OrderByInSubqueries
The patch is by no means complete; only some subqueries are yet allowed (parser
blocks others)
but the general approach should hopefully extend to the other kinds, since the
code added to
SubqueryNode is pretty generic. I just wanted to post this early in case
anybody has input on the general approach taken.
> Allow ORDER BY in subqueries
> ----------------------------
>
> Key: DERBY-4397
> URL: https://issues.apache.org/jira/browse/DERBY-4397
> Project: Derby
> Issue Type: Improvement
> Components: SQL
> Reporter: Dag H. Wanvik
> Attachments: derby-4397-insert-from-exists.diff,
> derby-4397-insert-from-exists.stat, orderBySpec.html, orderBySpec.html
>
>
> SQL 2008 allows ORDER BY to be specified in subqueries. In conjunction with
> OFFSET/FETCH and/or ROW_NUMBER
> meaningful subqueries with row ordering may be formulated. Cf. MySQL's LIMIT
> may be used in subqueries as well.
> Note that OFFSET/FETCH is currently not allowed in subqueries, either.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.