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

Home -> Community -> Usenet -> c.d.o.misc -> Re: How do I do this 2-table combined query?

Re: How do I do this 2-table combined query?

From: IANAL_VISTA <IANAL_Vista_at_hotmail.com>
Date: Wed, 31 Aug 2005 14:57:28 GMT
Message-ID: <Xns96C350F3EB4C6SunnySD@68.6.19.6>


"RK" <rekaben_at_yahoo.com> wrote in
news:1125498254.823545.163300_at_g49g2000cwa.googlegroups.com:

> I want to do a query based on two tables, t1 and t2;
>
> t1 has the fields f1 and f2 which are codes, and of course they are for
> different purposes no matter they have the same or different values in
> one record;
>
> t2 has the codes names interpretation, fields as cd and nm
>
> for example,
>
> for cd "cd-001" the nm is "Charlie",
> for cd "cd-002" the nm is "Marry" etc.
>
> Now I need to interprete the following result:
>
> select f1,f2 from t1;
>
> And then I need to interpret the code values into names.
>
> How can I use combined table query
>
> select a.f1,a.f2 ...
> from t1 a, t2 b
> where ...
>
> to get the intepretation at once?
>
> Thanks.
>
>

The homework tutor is down the hall on the left. Why is table T2 in the FROM clause when no data is being selected from it? Received on Wed Aug 31 2005 - 09:57:28 CDT

Original text of this message

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