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: DA Morgan <damorgan_at_psoug.org>
Date: Wed, 31 Aug 2005 08:07:13 -0700
Message-ID: <1125500790.630610@yasure>


RK wrote:
> 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.

www.psoug.org
click on Morgan's Library
click on Joins

-- 
Daniel A. Morgan
http://www.psoug.org
damorgan_at_x.washington.edu
(replace x with u to respond)
Received on Wed Aug 31 2005 - 10:07:13 CDT

Original text of this message

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