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: [email protected]
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

Reply via email to