Scott Frankel-3 wrote:
>
> Is it possible to join tables in the where clause of a statement
>
> I've explored the "where exists" clause, but that's not supported by
> the application toolkit I'm using. AFAIK, I've only got access to
> where ...
>
> Thanks in advance!
> Scott
>
Not entirely sure of the objective, but perhaps an inner join is the topic
for which you are looking? Else, I'd suggest one of the following formats
(which may, or may not, be available to you).
SELECT foo.* FROM (SELECT * FROM bar WHERE bar."bar_id"='value') AS foo
WHERE ....
SELECT foo.* FROM foo WHERE foo."bar_id" IN (SELECT bar."bar_id" FROM bar
WHERE ...);
SELECT foo.* FROM foo WHERE foo."bar_id" IN (SELECT bar."bar_id"
FROM(SELECT ....) AS bar WHERE ...);
--
View this message in context: http://www.nabble.com/where-clauses-and-multiple-tables-tp25355350p25355681.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.