Search Postgresql Archives

How to get joins to work

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux