I'm running a bunch of queries comparing data in two different tables, the my usual way of doing it is to use subqueries, select waht I need from each table and compare those results, however these tables are very large, 30,000 records each, so they take a long time to return results. I have been playing with Oracle's set operations, and I love the speed however they are returning way to much information, I want the records that are common to both tables, and I haven't been able to do that yet, I either get everyone in both tables or I get nothing.
A basic example of what I am trying to do:
Columns a,b,c are identifying information like name and employee number, and column d is the information I am looking at. If there is a way to do this with set operations, I would love the hint.
Lauren
Lauren McDonald, B.Sc.
Programmer Analyst
Saskatchewan Healthcare Employees' Pension Plan
A basic example of what I am trying to do:
Code:
select *
from
(select a,b,c,d
from x
)a,
(select a,b,c,d
from y
)b
where
a.a = b.a
Lauren
Lauren McDonald, B.Sc.
Programmer Analyst
Saskatchewan Healthcare Employees' Pension Plan