Re: [GENERAL] where clauses and multiple tables

2009-09-09 Thread David W Noon
On Tue, 08 Sep 2009 18:50:49 -0700, John R Pierce wrote about Re: [GENERAL] where clauses and multiple tables: Yaroslav Tykhiy wrote: By the way, folks, do you think there may be performance gain or loss from rewriting this with an explicit JOIN? E.g.: SELECT DISTINCT foo.foo_id, foo.name

[GENERAL] where clauses and multiple tables

2009-09-08 Thread Scott Frankel
Hello, Is it possible to join tables in the where clause of a statement? I ask because I have a situation where I only have access to the where clause of a select statement on a single table, yet I want to perform a join on multiple tables. eg: Given a statement as follows: SELECT

Re: [GENERAL] where clauses and multiple tables

2009-09-08 Thread miller_2555
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

Re: [GENERAL] where clauses and multiple tables

2009-09-08 Thread David W Noon
On Tue, 8 Sep 2009 14:25:20 -0700, Scott Frankel wrote about [GENERAL] where clauses and multiple tables: Is it possible to join tables in the where clause of a statement? [snip] Given a statement as follows: SELECT foo.foo_id, foo.name FROM foo, bar WHERE foo.bar_id = bar.bar_id

Re: [GENERAL] where clauses and multiple tables

2009-09-08 Thread Scott Frankel
On Sep 8, 2009, at 4:02 PM, David W Noon wrote: On Tue, 8 Sep 2009 14:25:20 -0700, Scott Frankel wrote about [GENERAL] where clauses and multiple tables: Is it possible to join tables in the where clause of a statement? [snip] Given a statement as follows: SELECT foo.foo_id, foo.name

Re: [GENERAL] where clauses and multiple tables

2009-09-08 Thread John R Pierce
Yaroslav Tykhiy wrote: By the way, folks, do you think there may be performance gain or loss from rewriting this with an explicit JOIN? E.g.: SELECT DISTINCT foo.foo_id, foo.name FROM foo JOIN bar ON foo.bar_id = bar.bar_id WHERE bar.name='martini'; I would expect that to be more efficient

Re: [GENERAL] where clauses and multiple tables

2009-09-08 Thread Yaroslav Tykhiy
On 09/09/2009, at 9:02 AM, David W Noon wrote: On Tue, 8 Sep 2009 14:25:20 -0700, Scott Frankel wrote about [GENERAL] where clauses and multiple tables: Is it possible to join tables in the where clause of a statement? [snip] Given a statement as follows: SELECT foo.foo_id, foo.name FROM