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


On Tue, Jan 5, 2016 at 5:15 PM, <libreoffice-ml.mbourne@spamgourmet.com>
wrote:

Don Parris wrote:

Still trying to work out the OUTER JOIN syntax apparently.  I tried a
simpler outer join statement:
SELECT
"tCoreType"."type" "Type", "tCoreCategory"."category" "Category"
FROM {oj "tCoreType" "ctype" LEFT OUTER JOIN "tCoreCategory" "ccat"
   ON "ctype"."type_id" = "ccat"."type_id"}


This gives me the following error:
SQL Status: S0022
Error code: -28

Column not found: tCoreType.type in statement [SELECT "tCoreType"."type"
"Type", "tCoreCategory"."category" "Category" FROM      "tCoreType"
"ctype"
LEFT OUTER JOIN "tCoreCategory" "ccat" ON "ctype"."type_id" =
"ccat"."type_id"  ]

The column "type" is most certainly one of the columns in the specified
table.  No matter what order or how I try to enter this, it just comes up
with an error message.  Any ideas?  I really would like to learn how to
make this work.


"tCoreType" "ctype" in the FROM clause renames the "tCoreType" as "ctype"
for the purposes of this query. So in the SELECT clause you need to refer
to it as "ctype", as you have done in the join condition. Likewise for
renaming "tCoreCategory" to "ccat". So:
SELECT "ctype"."type" "Type", "ccat"."category" "Category" ...

Mark.



Aha!  Many thanks Mark!  I was looking right past that.  I've revised and
re-run it - it's working now.  Additionally, I wrote another test query
that worked even without the '{oj}' syntax.

Again, I appreciate the help - and your patience - from both you and Luuk!


-- 
D.C. Parris, FMP, Linux+, ESL Certificate
Minister, Security/FM Coordinator, Free Software Advocate
http://dcparris.net/ <https://www.xing.com/profile/Don_Parris>
<http://www.linkedin.com/in/dcparris>
GPG Key ID: F5E179BE

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