How to get joins to work

From: Bill Ewing <wrewing001(at)yahoo(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: How to get joins to work
Date: 2006-10-24 21:43:07
Message-ID: 20061024214307.26449.qmail@web53609.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Magnus Hagander 2006-10-24 21:51:59 Re: 8.2beta1 installation fails
Previous Message Joshua D. Drake 2006-10-24 21:04:53 Call for Donations