Date: prev next · Thread: first prev next last
2017 Archives by date, by thread · List index


I have a query which works fine. But when I edited it in the graphical query
editor LO refused to save it saying that there was an SQL error. The
detailed message was "syntax error, unexpected $end, expecting BETWEEN or IN
or SQL_TOKEN_LIKE". Even if I try to save the unedited version I get the
error, which I find a bit bizarre. But it runs OK and gives the correct
result.

The SQL for the query is 

SELECT "Wines"."ID", "Wines"."Wine_Name" "Name", "Wines"."Year",
"Suppliers"."Name" "Supplier", "Wines"."Price", "Regions"."Region",
"Wines"."Bottles_Bought", "Wines"."Bottles_Left" "Left", "Wines"."Buy_Again"
"Buy", "Wines"."Avoid", "Wines"."Bin_End", "Wines"."Alcohol",
"Wines"."Acquired", "Wines"."Drink_By", "Wines"."Comments", "Styles"."Style"
FROM "Wines", "Suppliers", "Regions", "Styles" WHERE "Wines"."Supplier_Id" =
"Suppliers"."Id" AND "Wines"."Region_Id" = "Regions"."Id" AND
"Wines"."Style_Id" = "Styles"."Id" AND UCASE( "Wines"."Wine_Name" ) LIKE
UCASE( '%' || ( SELECT "filterstring" FROM "tblfilter" ) ) || '%'

I suspect that the problem is in the last clause.

The underlying database is HSQLDB.







-----
Peter
--
Sent from: http://nabble.documentfoundation.org/Users-f1639498.html

-- 
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.