[thelist] Only display first 100 records from access

David at softv.net David at softv.net
Thu Jan 17 10:43:05 CST 2002


If your primary keys for each record start at record 1 you can do this:

"SELECT column 1 , column 2 FROM table WHERE intID BETWEEN 100 AND 200"
SELECT 
rowID,Title,Initials,Surname,Company,Address1,Address2,Address3,Town,Postcod
e
FROM
MarketingFile WHERE rowID BETWEEN 100 AND 200"

If not, then you can select the first record, get the primary key (this is
assuming the field is an autonumber) and do the arithmetic to select the
records you want using between.

Dave




<<<<


Ok - so is it possible to select between records 100 to 200?
Now that would be really handy.


>>>>>>>>>
Paul-

I believe with Access you can use the TOP predicate in your sql statement.
So it would go...

SELECT TOP <n>...

SELECT TOP 100
Title,Initials,Surname,Company,Address1,Address2,Address3,Town,Postcode
FROM
MarketingFile

Chris Blessing
webguy at mail.rit.edu
http://www.330i.net



-- 
For unsubscribe and other options, including
the Tip Harvester and archive of TheList go to:
http://lists.evolt.org Workers of the Web, evolt ! 




More information about the thelist mailing list