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

            Bug ID: 96372
           Summary: Base hsqldb subquery problem after update.
           Product: LibreOffice
           Version: 5.0.3.2 release
          Hardware: x86-64 (AMD64)
                OS: Windows (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Base
          Assignee: [email protected]
          Reporter: [email protected]

Hi,

I have a wierd problem with Libreoffice Base. I had a working database and
forms. One of the forms has nested subforms, which are linked to master form
via master and slave fields. Those forms acquire their data through queries. I
wanted to have row numbers in one of my query, which was not supported by the
default hsqldb provided by Libreoffice. Therefore I used a newer version.
Everything worked and I could generate a column with row numbers in my query:

SELECT ROWNUM( ) "Pos", "b".* FROM ( SELECT "Services"."ID",
"Services"."InvoiceID", "Services"."ProductID", "Services"."Count",
"Products"."ID", "Products"."Name", "Products"."Description",
"Products"."Price", "Products"."Price" * "Products"."Count" "Total" FROM
"Products", "Products" WHERE "Services"."ProductID" = "Products"."ID" ) AS "b"

which is linked to a query:
SELECT "Invoices"."ID", .....

They are linked as such:
Master: "ID"
Slave: "Invoice"."ID"

But I get this following error from HSQLDB:
SQL Status: 42501
Error code: -5501

user lacks privilege or object not found: SYSTEM_SUBQUERY.InvoiceID

I think the problem is the subquery in "b".*, which somehow worked before but
not after the update. I did not use that database for a long time. So I am not
sure if is really after the update. But at LO 4.x.x it used to work.

Now the interesting part is, if I simply use the sub query alone:
SELECT "Services"."ID", "Services"."InvoiceID", "Services"."ProductID",
"Services"."Count", "Products"."ID", "Products"."Name",
"Products"."Description", "Products"."Price", "Products"."Price" *
"Products"."Count" "Total" FROM "Products", "Products" WHERE
"Services"."ProductID" = "Products"."ID"

It works perfectly but then I can't have the ROWNUM() function.
I suppose this is a bug from LO but if it is not, please correct me.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to