Re: [SQL] where clause subqueries vs multiple rows results

2006-09-11 Thread James Cloos
[SIGH] I was getting the syntax wrong. Just using ON rathar than = fixed the mistake. Time to crash for the night (day?) it seems Thanks for the replies; if I hadn't've figured it out myself they would have pushed me in the right direction. -JimC -- James Cloos <[EMAIL PROTECTED]>

Re: [SQL] where clause subqueries vs multiple rows results

2006-09-10 Thread Richard Broersma Jr
> I've a query which I'd have liked to word akin to: > > SELECT guid FROM child WHERE the_fkey = > ( SELECT id FROM parent WHERE name ~ 'some_regex' ) > ORDER BY the_fkey, my_pkey; > > I got around it by doing the SELECT id first, and then doing a SELECT > guid for each row re

Re: [SQL] where clause subqueries vs multiple rows results

2006-09-10 Thread Aaron Bono
Oops, see correction below...On 9/10/06, Aaron Bono <[EMAIL PROTECTED]> wrote: On 9/10/06, James Cloos <[EMAIL PROTECTED]> wrote: I've a query which I'd have liked to word akin to:  SELECT guid FROM child WHERE the_fkey = ( SELECT id FROM parent WHERE name ~ 'some_regex' ) ORDER BY

Re: [SQL] where clause subqueries vs multiple rows results

2006-09-10 Thread Aaron Bono
On 9/10/06, James Cloos <[EMAIL PROTECTED]> wrote: I've a query which I'd have liked to word akin to:  SELECT guid FROM child WHERE the_fkey = ( SELECT id FROM parent WHERE name ~ 'some_regex' ) ORDER BY the_fkey, my_pkey;I got around it by doing the SELECT id first, and then doing

[SQL] where clause subqueries vs multiple rows results

2006-09-10 Thread James Cloos
I've a query which I'd have liked to word akin to: SELECT guid FROM child WHERE the_fkey = ( SELECT id FROM parent WHERE name ~ 'some_regex' ) ORDER BY the_fkey, my_pkey; I got around it by doing the SELECT id first, and then doing a SELECT guid for each row returned, appendin