Opened 16 years ago
Last modified 16 years ago
#603 released defect
Oracle DataManager emits invalid SQL when LIMIT is specified and no WHERE clause exists
| Reported by: | bweaver | Owned by: | bweaver |
|---|---|---|---|
| Priority: | critical | Milestone: | Release Candidate 3 |
| Component: | Middle Tier | Version: | 2.0.1635 |
| Severity: | Keywords: | ||
| Cc: | Database Engine: | Oracle | |
| Operating System: | N/A |
Description
See get_sys_table_field dataview. It has a subselect in the SELECT clause and no WHERE after the main FROM clause. This causes the Oracle DataManager to put the WHERE ROWNUM < X on the subselect instead of the outer SELECT.
Need to change row limiting SQL to wrap the entire statement so it works properly with UNION and UNION ALL as well -- just like in SQL Server. Example:
select * from sys_table
becomes this with Limit=20 and Offset=10:
select * from (select * from sys_table) where rownum < 20 and rownum > 10
Change History (2)
comment:1 by , 16 years ago
| Status: | new → addressed |
|---|
comment:2 by , 16 years ago
| Status: | addressed → released |
|---|
Note:
See TracTickets
for help on using tickets.

(In [1652]) - fixes #601