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 -> How do I do this 2-table combined query?

How do I do this 2-table combined query?

From: RK <rekaben_at_yahoo.com>
Date: 31 Aug 2005 07:24:14 -0700
Message-ID: <1125498254.823545.163300@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. Received on Wed Aug 31 2005 - 09:24:14 CDT

Original text of this message

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