[thelist] Only display first 100 records from access

Paul Backhouse paul.backhouse at 2cs.com
Thu Jan 17 10:47:29 CST 2002


Mate, you're a god dam genius!

-----Original Message-----
From: thelist-admin at lists.evolt.org
[mailto:thelist-admin at lists.evolt.org]On Behalf Of David at softv.net
Sent: 17 January 2002 16:49
To: thelist at lists.evolt.org
Subject: RE: [thelist] Only display first 100 records from access


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 !

--
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