Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Intersect?

Status
Not open for further replies.

Indrawati

Programmer
Joined
Mar 28, 2004
Messages
2
Location
SG
Hi

Could someone tell me how I can select records e.g. 501-1000 in a table using SQL? I've tried using something like (the table Data has 3000 records):

(SELECT TOP 1000 * FROM Data ORDER BY ID ASC)
INTERSECT
(SELECT TOP 2500 * FROM Data ORDER BY ID DESC)

but apparently MS Access 2000 does not recognize INTERSECT.

Thanks!
 
Soemething like this ?
SELECT TOP 500 * FROM
(SELECT TOP 1000 * FROM Data ORDER BY ID ASC) AS T
ORDER BY T.ID DESC;


Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top