How to get joins to work - Mailing list pgsql-general

From Bill Ewing
Subject How to get joins to work
Date
Msg-id 20061024214307.26449.qmail@web53609.mail.yahoo.com
Whole thread Raw
Responses Re: How to get joins to work  (Martijn van Oosterhout <kleptog@svana.org>)
Re: How to get joins to work  (Michael Glaesemann <grzm@seespotcode.net>)
List pgsql-general
I am having trouble getting joins to work.  In a Java app that uses Hibernate 3.1, I am able to build queries that join two, three or more tables using combinations of INNER JOIN,  LEFT JOIN or RIGHT JOIN.  But, I need FULL OUTER JOIN to work and have not been able to get them to work in Hibernate.

So I decided to go back to basics and practice trial joins in the PgAdminIII Query tool (v1.4.1, Dec 05).

Just to warm up, I did the following simple queries which all worked:
  select * FROM rack r
  select * FROM sample s

The above two tables are linked.  But, none of the following SQL worked:
  select * FROM rack r JOIN sample s
  select * FROM rack r INNER JOIN sample s


In each case I get a message "ERROR:  syntax error at end of input at character X" where X is the last character in the statement.

What am I doing wrong?

I have done tons of joins in Hibernate between the rack and sample tables, so you might take my word for it that the two tables mentioned are indeed linked.

TIA,
Bill

pgsql-general by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Call for Donations
Next
From: "Magnus Hagander"
Date:
Subject: Re: 8.2beta1 installation fails