| Summary: | Query Builder generates invalid Oracle syntax causing ora-00933 (AS keyword is not supported by Oracle) | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Tools] Data Tools | Reporter: | Frits Jalvingh <jal> | ||||||
| Component: | SQL Query Builder | Assignee: | Brian Payton <bpayton> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | bpayton, lchan | ||||||
| Version: | 1.8 | ||||||||
| Target Milestone: | 1.8.1 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
Created attachment 174931 [details]
Proposed patch
Created attachment 175346 [details]
Patch for plugin o.e.d.sqltools.sqlbuilder
Fix looks OK. I reworked patch slightly so all "if"s have brackets and to move the "new VendorHelper" out of the if-test. (Simple if-tests make debugging easier.)
Checked in fix, tagged to v201007280345. |
Build Identifier: 20100617-1415 Select "DataSet" in Data Explorer; create a new one on a data source connected to an Oracle (10g in my case) database. Create a query using a table alias using the query builder The generated SQL looks like: SELECT NAAM, SYST_ID, IND_GEBLOKKEERD, ADMN_ID, CLUS_ID, COMT_ID, VLTA_ID, ID FROM DEMO.GEBRUIKERS AS GEBR This SQL is invalid for Oracle- it does not support the 'as' keyword. The query causes the error: A BIRT exception occurred. Plug-in Provider:Eclipse.org Plug-in Name:BIRT Data Engine Plug-in ID:org.eclipse.birt.data Version:2.6.0.v20100524 Error Code:odaconsumer.CannotGetResultSetMetaData Error Message:Cannot get the result set metadata. org.eclipse.birt.report.data.oda.jdbc.JDBCException: SQL statement does not return a ResultSet object. SQL error #1: ORA-00933: SQL command not properly ended Whatever you do- since the query is always regenerated the as will reappear.. Reproducible: Always Steps to Reproduce: See description