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"


 FROM "table1 name", "table2 name"


For unsubscribe instructions e-mail to:
Posting guidelines + more:
List archive:
All messages sent to this list will be publicly archived and cannot be deleted


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.