https://bugs.documentfoundation.org/show_bug.cgi?id=98857

            Bug ID: 98857
           Summary: BASE: Create Query Design Wizard generates wrong
                    ORACLE SQL queries
           Product: LibreOffice
           Version: 5.0.5.2 release
          Hardware: All
                OS: Windows (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Base
          Assignee: [email protected]
          Reporter: [email protected]

Connected BASE to Oracle XE database via ODBC. Tables are in Oracle.

Used "Create Query Design Wizard.." to generate a query against Oracle.

It generated the following SQL Syntax which is rejected by Oracle wit
ORA-00933: SQL command not properly ended.

SELECT "CUST"."ID", "CUST_RATE"."CUST_ID" 
FROM "KIS_TEXI"."CUST_RATE" AS "CUST_RATE", 
"KIS_TEXI"."CUST" AS "CUST" 
WHERE "CUST_RATE"."CUST_ID" = "CUST"."ID"

Correct (for Oracle) would be:
SELECT "CUST"."ID", "CUST_RATE"."CUST_ID" 
FROM "KIS_TEXI"."CUST_RATE" "CUST_RATE", 
"KIS_TEXI"."CUST" "CUST" 
WHERE "CUST_RATE"."CUST_ID" = "CUST"."ID"

The use of the "AS" keyword in the FROM clause for table aliasing is not
allowed in Oracle SQL (whilst it is in SQLServer, MySql, Postgres).

Work around: manually correct each generated SQL and remove the "AS" keyword
from the FROM clause

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to