If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > MS Access 2002 SQL

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-15-04, 09:26
WarrenM WarrenM is offline
Registered User
 
Join Date: May 2004
Location: NH
Posts: 87
MS Access 2002 SQL

Is there a set operator in MS Access 2002 with the equivelent functionality of the MINUS operator in Oracle?

I'm pulling my hair out trying to figure out a way to run a query without the MINUS operator; rather difficult.

table_all - 1000 rows
table_some - 800 rows
table_bogus - 100 rows

I can't get the last 100 rows that I need.... is that too vague?

-Thanks!
Warren
Reply With Quote
  #2 (permalink)  
Old 07-15-04, 09:40
r123456 r123456 is offline
Registered User
 
Join Date: Sep 2003
Location: The extremely Royal borough of Kensington, London
Posts: 778
1)
Select top 100
from tableA
order by column DESC

2)
select *
from
(select top 200 *
from tableA
order by column) V
where V.key NOT IN
(select top 100 key order by column)
__________________
Bessie Braddock: Winston, you are drunk!
Churchill: And Madam, you are ugly. And tomorrow, I'll be sober, and you will still be ugly.

Last edited by r123456; 07-15-04 at 09:50.
Reply With Quote
  #3 (permalink)  
Old 07-15-04, 10:10
WarrenM WarrenM is offline
Registered User
 
Join Date: May 2004
Location: NH
Posts: 87
AHH I figured it out... LEFT JOIN on table where value is NULL! Thanks for your reply.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On