Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Combining columns of two tables
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