Bug 159236 - Running specific query in LibreOffice Base does not work
Summary: Running specific query in LibreOffice Base does not work
Status: RESOLVED INVALID
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
7.6.4.1 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-17 08:46 UTC by Canoel K.
Modified: 2024-01-31 12:22 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Canoel K. 2024-01-17 08:46:07 UTC
Description:
When opening this file (https://file.io/ubY52Z0AjH0A) in LibreOffice Base and running the shown query (https://ibb.co/album/WGqGK2) it returns the shown error. The query in of itself has no issues and running it with other Conditions after the WHERE clause works properly. When reconstructing the table manually in a new/seperate file and running the same query, everything works fine.

Steps to Reproduce:
1. Open the attached file (https://file.io/ubY52Z0AjH0A) in LibreOffice Base
2. Create a new SQL query
3. Type in the shown query (SELECT * FROM Sortiment WHERE Rubrik = "Zeichnen") and run

Actual Results:
Two errors:
SQL Status: S0022
Error code: -28

Column not found: Zeichnen in statement [SELECT * FROM "Sortiment" WHERE "Rubrik" = "Zeichnen"] at ./connectivity/source/drivers/jdbc/Object.cxx:173

and

The data content could not be loaded. at ./connectivity/source/commontools/dbtools.cxx:746

Expected Results:
Run the query properly and show the results


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Version: 7.6.4.1 (X86_64) / LibreOffice Community
Build ID: 60(Build:1)
CPU threads: 4; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: de-DE (en_GB.UTF-8); UI: en-US
Debian package version: 4:7.6.4~rc1-1+b2
Calc: threaded
Comment 1 m_a_riosv 2024-01-17 15:54:50 UTC
The text on WHERE must be with single quotes.
SELECT * FROM Sortiment WHERE Rubrik = 'Zeichnen'
works for me.
Comment 2 Canoel K. 2024-01-19 10:50:58 UTC
(In reply to m_a_riosv from comment #1)
> The text on WHERE must be with single quotes.
> SELECT * FROM Sortiment WHERE Rubrik = 'Zeichnen'
> works for me.

Usually double quotes work too, except for this file. When re-creating this file manually, double quotes work as normal.
This is inconsistent behavior.
Comment 3 m_a_riosv 2024-01-20 00:11:08 UTC
I don't think so, double quotes are for fields, no for strings.
Comment 4 Robert Großkopf 2024-01-20 11:26:59 UTC
Attachment isn't available, but

SELECT * FROM "Sortiment" WHERE "Rubrik" = "Zeichnen"

expect 2 fields: "Rubrik" and "Zeichnen" and will show all rows where content of "Rubrik" and "Zeichnen" are the same. 

Double-quotes are used for quoting fields and tables, not for quoting text content. For text content you will need single quotes.

Please have a look at the documentation. When I see the query it might be German Base Handbuch you will need:
https://de.libreoffice.org/get-help/documentation/