
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Extract difference-Oracle Minus operation.
Hi guys,
here i have a task- i want to get a difference between two tables in the third table. For example, if the table m1 contains rows: 2005,2006,2007,2008 and the table m2 contains: 2005, then the table m3 must contain:2006,2007,2008.
I've got the script which loads the first and the second tables:
m1:
Load *;
sql
select distinct year(orderdate) as sqlyearlist
from AdventureWorks2012.Sales."vSalesOrderHeader-July"
order by 1 asc;
m2:
LOAD Distinct year(OrderDate) as qvdyearlist
FROM Orders_*.QVD (qvd);
Appreciate any advises and solutions.
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
m3:
LOAD sqlyearlist as resultyearlist
Resident m1 where not exists(qvdyearlist, sqlyearlist);
edit: changed exists arguments


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
m3:
LOAD sqlyearlist as resultyearlist
Resident m1 where not exists(qvdyearlist, sqlyearlist);
edit: changed exists arguments

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks!
