On Oct 25, 2006, at 6:43 , Bill Ewing wrote:
> 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?
Unless you're using NATURAL JOIN, you need to specify the join
condition using a USING or ON clause, e.g.,
SELECT *
FROM rack r
JOIN sample s USING (rack_id)
or
SELECT *
FROM rack r
JOIN sample s ON (r.rack_id = s.rack_id)
That should do it.
Michael Glaesemann
grzm seespotcode net