Hi,
I’ve just set up LibreOffice Base under Linux 64-bit (though I’ve encountered the same issue under WIndows) to learn the SQL language. I’ve found that commands that reference tables (SELECT fieldname FROM tablename;) work, but commands that don’t reference a table fail. This includes commands listed in tutorials (and that execute in online interpreters). The simplest example is
SELECT 1 + 1;
Another is
SELECT FIELD(‘A’, ‘A’, ‘B’)
For both, I get the error message
Syntax error in SQL statement ./dbaccess/source/core/api/SingleSelectQueryComposer.cxx:109
In trying to google this, I’ve read that it may be an interpreter problem and the fix is to enable the ‘Run SQL commands directly’ option. However, all commands (including the ones that work without it) fail with that option enabled. I get the error message
The data content could not be loaded. /connectivity/source/commontools/dbtools.cxx:751
And below that
Access is denied. FIELD in statement [SELECT FIELD(‘A’, ‘A’, ‘B’)] ./connectivity/source/drivers/jdbc/Object.cxx:175
I assume I haven’t set up something correctly. (I didn’t to do anything except installing Base with “sudo apt-get install libreoffice-base” and then creating an empty database.) But I don’t know what to do about it.
Any help would be appreciated!