pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Scott Chapman <sec@proaxis.com>
To: pgsql-sql@postgresql.org
Subject: SQL Query help needed - newbie question
Date: Wed, 2 Feb 2000 20:30:47 -0800
Message-ID: <00020220331102.00960@localhost.localdomain> (raw)

I am new to SQL and PostgreSQL and I'm not sure how to get this done in one
query:

I have 3 tables:

Vendor
------
VendorNumber
EmailAddress
.....


CrossReference
--------------
VendorNumber
PartType
SystemType


PartRequest
--------
RequestNumber
PartType
SystemType
.....

I am processing the Parts Requests.

I need a query that returns the PartRequest.RequestNumber and
Vendor.EmailAddress so I can send the Request to all Vendors that carry the
requested PartType & SystemType combinations of parts.

So a given Request may be for a PartType of PrinterCable and SystemType of
Macintosh.

The CrossReference table has a list of all vendors that carry PrinterCables for
Macintoshes.

I am using PostgreSQL so I don't have foreign keys and I'm not sure enough of
SQL yet to know if that's a problem.

Can someone here please help me with this query?
Thanks!
-- 
Scott Chapman sends....
sec@proaxis.com



view thread (2+ messages)  latest in thread

Message-ID: <00020220331102.00960@localhost.localdomain>
Permalink:  ../00020220331102.00960@localhost.localdomain/
Also on:    postgresql.org/message-id/00020220331102.00960@localhost.localdomain

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: sec@proaxis.com
  Subject: Re: SQL Query help needed - newbie question
  In-Reply-To: <00020220331102.00960@localhost.localdomain>
  References: <00020220331102.00960@localhost.localdomain>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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