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
@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
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
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?
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
, 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
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
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