[Libreoffice-bugs] [Bug 144694] Base Direct SQL Not Running Properly

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sat Sep 25 06:40:01 UTC 2021


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

Robert Großkopf <robert at familiegrosskopf.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW

--- Comment #3 from Robert Großkopf <robert at familiegrosskopf.de> ---
@Julien
You need an SQLite-connection with ODBC. The command flywire posted won't run
with internal HSQLDB.

If you have connected to SQLite (empty file for the database content, ODBC
installed) you could run

---
CREATE TABLE org(
  name TEXT PRIMARY KEY,
  boss TEXT REFERENCES org
) WITHOUT ROWID;
INSERT INTO org VALUES('Alice',NULL);
INSERT INTO org VALUES('Bob','Alice');
INSERT INTO org VALUES('Cindy','Alice');
INSERT INTO org VALUES('Dave','Bob');
INSERT INTO org VALUES('Emma','Bob');
INSERT INTO org VALUES('Fred','Cindy');
INSERT INTO org VALUES('Gail','Cindy');
---
under tools → SQL

This will work. The part, which is really a query, won't work under Tools →
SQL, but will work when created as a query with direct SQL:

---
WITH RECURSIVE
  under_alice(name,level) AS (
    VALUES('Alice',0)
    UNION ALL
    SELECT org.name, under_alice.level+1
      FROM org JOIN under_alice ON org.boss=under_alice.name
     ORDER BY 2 DESC
  )
SELECT substr('..........',1,level*3) || name FROM under_alice;
---
Try this as a query, switched to direct SQL. It will give the result flywire
posted.
Try this query with Tools → SQL, switched by the new possibility to "Run SQL
command directly". It won't give any result, The message will be:
"The execution of the update statement doesn't effect any rows."

So we get different results in the query editor and in Tools → SQL with direct
executed SQL. Seems Tools → SQL doesn't really run directly, only sets escaping
to false.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210925/6c9487a3/attachment.htm>


More information about the Libreoffice-bugs mailing list