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 -> Combining columns of two tables

Combining columns of two tables

From: Sameer <dolpheen_at_gmail.com>
Date: 25 Oct 2006 23:28:44 -0700
Message-ID: <1161844124.554714.303210@h48g2000cwc.googlegroups.com>


Please have a look at this query.

SELECT mr_issues_aging.*, notclosed
FROM mr_issues_aging,
 (SELECT MODULE AS m,

    COUNT(MODULE) AS notclosed FROM mr_issue_details   WHERE NOT(laststatus = 'Close')
  GROUP BY MODULE)
WHERE m = mr_issues_aging.MODULE

I want to create a table having columns of both mr_issues_aging and inner query.
This query is combining columns of both tables but both tables do not have same number of rows. The mr_issues_aging table is having one more row than the inner query, therefore I am not getting the expected output.
Is this a proper way to add columns from two tables? How to resolve this? Can I add some dummy rows to inner query by using union, but how to do this?
Please help.
-Sameer Received on Thu Oct 26 2006 - 01:28:44 CDT

Original text of this message

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