[SQL] Is it This Join Condition Do-Able?

2005-08-17 Thread Lane Van Ingen
Given three tables: a, b, c ; each consist of a 'keyfld' and a field called 'foo': tbl a tbl b tbl c - - - a.keyfldb.keyfld c.keyfld a.foo1 b.foo2 c.foo3 I want to always return all of tbl a; and I want to return

Re: [SQL] Is it This Join Condition Do-Able?

2005-08-17 Thread Dmitri Bichko
@postgresql.org Subject: [SQL] Is it This Join Condition Do-Able? Given three tables: a, b, c ; each consist of a 'keyfld' and a field called 'foo': tbl a tbl b tbl c - - - a.keyfldb.keyfld c.keyfld a.foo1 b.foo2

Re: [SQL] Is it This Join Condition Do-Able?

2005-08-17 Thread Michael Fuhr
On Wed, Aug 17, 2005 at 12:54:50PM -0400, Lane Van Ingen wrote: Given three tables: a, b, c ; each consist of a 'keyfld' and a field called 'foo': tbl a tbl b tbl c - - - a.keyfldb.keyfld c.keyfld a.foo1 b.foo2

Re: [SQL] Is it This Join Condition Do-Able?

2005-08-17 Thread Jeremy Semeiks
On Wed, Aug 17, 2005 at 12:54:50PM -0400, Lane Van Ingen wrote: Given three tables: a, b, c ; each consist of a 'keyfld' and a field called 'foo': tbl a tbl b tbl c - - - a.keyfldb.keyfld c.keyfld a.foo1 b.foo2

Re: [SQL] Is it This Join Condition Do-Able?

2005-08-17 Thread Dmitri Bichko
: Re: [SQL] Is it This Join Condition Do-Able? Quoting Dmitri Bichko [EMAIL PROTECTED]: How about: SELECT a.keyfld, a.foo1, b.foo2, c.foo3 FROM a LEFT JOIN b USING(keyfld) LEFT JOIN c USING(keyfld) ((( See response at end ))) -Original Message- [mailto:[EMAIL

Re: [SQL] Is it This Join Condition Do-Able?

2005-08-17 Thread Mischa Sandberg
, August 17, 2005 12:55 PM Subject: [SQL] Is it This Join Condition Do-Able? Given three tables: a, b, c ; each consist of a 'keyfld' and a field called 'foo': tbl a tbl b tbl c - - - a.keyfldb.keyfld c.keyfld a.foo1

Re: [SQL] Is it This Join Condition Do-Able?

2005-08-17 Thread Tom Lane
Mischa Sandberg [EMAIL PROTECTED] writes: Anyone care to comment on the third row of output? I think you mistyped the last INSERT: insert into c values(2, 'C2'); insert into b values(3, 'C3'); I suppose you meant insert into c ... regards, tom lane

Re: [SQL] Is it This Join Condition Do-Able? Ooh, ouch, blush

2005-08-17 Thread Mischa Sandberg
The Subject says it all. (author beats a hasty retreat). Quoting Dmitri Bichko [EMAIL PROTECTED]: I don't see what the problem is. Did you mean to insert (3,'C3') into table c, rather than b? create temp table a(keyf int, val text); create temp table b(keyf int, val text); create temp