Link to home
Start Free TrialLog in
Avatar of joaotelles
joaotellesFlag for United States of America

asked on

Query - relate results (Oracle10g and SQLplus)

Hi,

I have a query that gives me a list of codes:
 SELECT
  DSC.DSC_ID
FROM
D_SUBN DSN,
D_CAD DSC
WHERE
DSC.DSC_ID = DSN.DSC_ID
and  DSN.DSN_DSS is not null;

With this I get something like this:
   DSC_ID
----------
         1
         2
         3
         4
         5
       101
       102
       103
       104
       105
       201
       202
       .
       .
66 rows selected.

So i have this other table called: JM_Cce which has the column DSC_ID too....

So I want to know how can I take the result of the query one (above) to compare with the DCS_ID I have at JM_Cce...

Tks,
Joao
ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
< So I want to know how can I take the result of the query one (above) to compare with the DCS_ID I have at JM_Cce...

If you want the matching values between these tables...

SELECT   DSC.DSC_ID ,j.dsc_id
FROM D_SUBN DSN,D_CAD DSC, JM_Cce j
WHERE DSC.DSC_ID = DSN.DSC_ID
and dsc.dsc_id =j.dsc_id
and  DSN.DSN_DSS is not null;
Avatar of joaotelles

ASKER

tx