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


The FROM clause is where I am having errors returned. The outline that I am using for this clause is:

FROM "Table name" [{CROSS | INNER | LEFT OUTER | RIGHT OUTER} JOIN "Table name" ON Expression] [, ...]

I have two tables with a child parent relationship:

"Persons"."P_ID" = "Orders"."P_ID"

These queries run without errors: (INNER JOIN has no fields with a NULL value; LEFT OUTER JOIN has NULL values in the OrderNo field; RIGHT OUTER JOIN has NULL values for the two fields in the "Persons" fields.)

SELECT "Persons"."Last", "Persons"."First", "Orders"."OrderNo"
FROM "Persons" INNER JOIN "Orders" ON  "Persons"."P_ID" = "Orders"."P_ID"

SELECT "Persons"."Last", "Persons"."First", "Orders"."OrderNo"
FROM "Persons" LEFT OUTER JOIN "Orders" ON "Persons"."P_ID" = "Orders"."P_ID"

SELECT "Persons"."Last", "Persons"."First", "Orders"."OrderNo"
FROM "Persons" RIGHT OUTER JOIN "Orders" ON "Persons"."P_ID" = "Orders"."P_ID"

But the following SQL creates an error when the following is run:

SELECT "Persons"."Last", "Persons"."First", "Orders"."OrderNo"
FROM "Persons" CROSS JOIN "Orders" ON  "Persons"."P_ID" = "Orders"."P_ID"

The error message: The data can not be loaded. Column not found: "P_ID" in statement ...

I know that this outline will create a CROSS JOIN for any pair of tables:

SELECT "table1 name"."field name", "table2 name"."field name", ... FROM "table1 name", "table2 name

So, it seems that this is one place where we should ignore the manual (HSQLDB user guide 1.8). It may be that this has been corrected in the 2.2.8 user guide. It uses

FROM "table1 name" CROSS JOIN "table2 name"

                OR

 FROM "table1 name", "table2 name"

--Dan

--
For unsubscribe instructions e-mail to: users+help@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.