- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 09-12-2012 03:42 PM
(31514 views)
Hi, as you can see I'm not that familiar with proc sql, but how can I subtract the results from one table from another table? using minus.?
If I have table A with 20,000 records and table B a subsidiary of A with 12,000, I want to get Table C with the remaining 18,000 recods.. in PROC SQL Thanks
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Use 'except':
proc sql;
create table c as
select * from a
except
select * from b;
I suppose that you had a typo in your post: B has 2000 obs instead of 12000.
Haikuo