pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedMultiple table join
4+ messages / 3 participants
[nested] [flat]
* Multiple table join
@ 2003-10-06 16:26 Louise Cofield <lcofield@box-works.com>
2003-10-06 16:38 ` Re: Multiple table join Bruno Wolff III <bruno@wolff.to>
2003-10-06 16:39 ` Re: Multiple table join Dan Langille <dan@langille.org>
0 siblings, 2 replies; 4+ messages in thread
From: Louise Cofield @ 2003-10-06 16:26 UTC (permalink / raw)
To: pgsql-sql
Greetings, SQL gurus!
I am attempting to select fields Location and Item_Num from table A
where A.Location = B.Location,
AND
select Item_Description from table C, where A.Item_Num = C.Item_Num.
Any help would be appreciated.
Louise
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Multiple table join
2003-10-06 16:26 Multiple table join Louise Cofield <lcofield@box-works.com>
@ 2003-10-06 16:38 ` Bruno Wolff III <bruno@wolff.to>
2003-10-06 16:35 ` Re: Multiple table join Louise Cofield <lcofield@box-works.com>
1 sibling, 1 reply; 4+ messages in thread
From: Bruno Wolff III @ 2003-10-06 16:38 UTC (permalink / raw)
To: Louise Cofield <lcofield@box-works.com>; +Cc: pgsql-sql
On Mon, Oct 06, 2003 at 10:26:59 -0600,
Louise Cofield <lcofield@box-works.com> wrote:
>
> I am attempting to select fields Location and Item_Num from table A
> where A.Location = B.Location,
>
> AND
>
> select Item_Description from table C, where A.Item_Num = C.Item_Num.
Just list all three tables in the from item list and include both
conditions in the where clause (connected by and).
If there is more to your problem than this, you should supply more details.
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Multiple table join
2003-10-06 16:26 Multiple table join Louise Cofield <lcofield@box-works.com>
2003-10-06 16:38 ` Re: Multiple table join Bruno Wolff III <bruno@wolff.to>
@ 2003-10-06 16:35 ` Louise Cofield <lcofield@box-works.com>
0 siblings, 0 replies; 4+ messages in thread
From: Louise Cofield @ 2003-10-06 16:35 UTC (permalink / raw)
To: 'Bruno Wolff III' <bruno@wolff.to>; +Cc: pgsql-sql
That was waaaaay too simple -- thank you!
-----Original Message-----
From: Bruno Wolff III [mailto:bruno@wolff.to]
Sent: Monday, October 06, 2003 10:38 AM
To: Louise Cofield
Cc: pgsql-sql@postgresql.org
Subject: Re: [SQL] Multiple table join
On Mon, Oct 06, 2003 at 10:26:59 -0600,
Louise Cofield <lcofield@box-works.com> wrote:
>
> I am attempting to select fields Location and Item_Num from table A
> where A.Location = B.Location,
>
> AND
>
> select Item_Description from table C, where A.Item_Num = C.Item_Num.
Just list all three tables in the from item list and include both
conditions in the where clause (connected by and).
If there is more to your problem than this, you should supply more
details.
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Multiple table join
2003-10-06 16:26 Multiple table join Louise Cofield <lcofield@box-works.com>
@ 2003-10-06 16:39 ` Dan Langille <dan@langille.org>
1 sibling, 0 replies; 4+ messages in thread
From: Dan Langille @ 2003-10-06 16:39 UTC (permalink / raw)
To: Louise Cofield <lcofield@box-works.com>; +Cc: pgsql-sql
On 6 Oct 2003 at 10:26, Louise Cofield wrote:
> I am attempting to select fields Location and Item_Num from table A
> where A.Location = B.Location,
>
> AND
>
> select Item_Description from table C, where A.Item_Num = C.Item_Num.
Try:
select Location, Item_Num
from table A, B, C
where A.Location = B.Location
and A.Item_Num = C.Item_Num
--
Dan Langille : http://www.langille.org/
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2003-10-06 16:39 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-10-06 16:26 Multiple table join Louise Cofield <lcofield@box-works.com>
2003-10-06 16:38 ` Bruno Wolff III <bruno@wolff.to>
2003-10-06 16:35 ` Louise Cofield <lcofield@box-works.com>
2003-10-06 16:39 ` Dan Langille <dan@langille.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox