Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | [cws hsqldb19] SQL statement errors generates confusins error messages | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Base | Reporter: | drewjensen.inbox | ||||||
Component: | code | Assignee: | AOO issues mailing list <issues> | ||||||
Status: | CONFIRMED --- | QA Contact: | |||||||
Severity: | Trivial | ||||||||
Priority: | P3 | CC: | issues | ||||||
Version: | DEV300m61 | ||||||||
Target Milestone: | --- | ||||||||
Hardware: | Unknown | ||||||||
OS: | All | ||||||||
Issue Type: | DEFECT | Latest Confirmation in: | --- | ||||||
Developer Difficulty: | --- | ||||||||
Attachments: |
|
Description
drewjensen.inbox
2009-10-20 18:17:36 UTC
Created attachment 65479 [details]
bug document
Assign to developer This might be more appropriate as an error in the error message. The first statement does have a mistake in the CONCAT funciton. Fix that with: SELECT cu.customer_id AS ID, CONCAT(CONCAT(cu.first_name, ' '), cu.last_name) AS name, a.address AS address, a.postal_code AS "zip code", a.phone AS phone, city.city AS city, country.country AS country, IF(cu.active, 'active', '') AS notes, cu.store_id AS SID FROM customer AS cu JOIN address AS a ON cu.address_id = a.address_id JOIN city ON a.city_id = city.city_id JOIN country ON city.country_id = country.country_id So - the IF is wrong for the HSQLdb dialect, but try to run it and the same error as above is generated from the C++ runtime, the OO.o error dialog box however now shows: user lacks privlidges or object not found IF Finally - if I clean it up and just pull out (what seems like a legit IF clause to me) the query runs, and creates the view. SELECT cu.customer_id AS ID, COALESCE(cu.first_name || ' ' || cu.last_name, cu.last_name, cu.first_name, '') AS name, a.address AS address, a.postal_code AS "zip code", a.phone AS phone, city.city AS city, country.country AS country, -- IF cu.active <> FALSE THEN -- 'active' -- ELSE -- '' -- END AS notes, 'active' AS notes, cu.store_id AS SID FROM customer AS cu JOIN address AS a ON cu.address_id = a.address_id JOIN city ON a.city_id = city.city_id JOIN country ON city.country_id = country.country_id Created attachment 65523 [details]
bug document with example table
Adjust target Change target to 3.4. Just change target. |