Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Help with this Select statement please

Re: Help with this Select statement please

From: harry <spammemothers_at_yahoo.co.uk>
Date: Tue, 26 Apr 2005 15:02:15 GMT
Message-ID: <XJsbe.19963$G8.19252@text.news.blueyonder.co.uk>


many thanks chet!

"Chet Justice" <chet.justice_at_pfsf.org> wrote in message news:1114527571.290780.180620_at_g14g2000cwa.googlegroups.com...
> I have 2 tables
> Harry wrote:
>
> >Customer Importance
> >======= ==========
> >cust_id id
> >priority_id descr
> >status_id
>
>
> >priority_id & status_id are both foreign keys for the >Importance
> table's
> >primary key id field.
>
>
> >I'm trying to work out how to construct a SELECT statement >like -
> select
> >cust_id, descr (based on priority_id), descr (based on >status_id) but
> as
> >they are in the same table it's really confusing!
>
>
> 1 SELECT
> 2 custid,
> 3 b.desc priority_description,
> 4 c.desc status_description
> 5 FROM
> 6 customer a,
> 7 importance b,
> 8 importance c
> 9 WHERE a.priority_id = b.id
> 10* AND a.status_id = c.id
>
> chet
>
Received on Tue Apr 26 2005 - 10:02:15 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US