Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: Limiting rows returned


Message #1 by "Mark Roworth" <mark.roworth@b...> on Tue, 19 Nov 2002 22:16:26 -0000
Aha! Very kind. Thanks,

Mark

-----Original Message-----
From: Aron Gamble [mailto:aron.gamble@e...]
Sent: 20 November 2002 11:45
To: professional vb
Subject: [pro_vb] Re: Limiting rows returned


Hi..

try..

SELECT TOP 100 FROM ....

Aron




-----Original Message-----
From: Mark Roworth [mailto:mark.roworth@b...]
Sent: 20 November 2002 11:40
To: professional vb
Subject: [pro_vb] Re: Limiting rows returned


That's okay, slow Wednesdays are the best. I celebrate midweek at 12:00!

What I meant is, I want to limit the query to the first, say, 100 rows no
matter how many it would return if the limitation wasn't there. Something
like:

SELECT *
FROM   Customer
WHERE  ROWNUM < 100
ORDER BY Surname

will return the first 100 customers. Is there a way to do this in Access?
Someone mentioned the keyword 'TOP'. Thanks,

Mark Roworth
Dolphin Computing Ltd
01273 262865
mark.roworth@b...

-----Original Message-----
From: andy irvine [mailto:andy@i...]
Sent: 20 November 2002 11:32
To: professional vb
Subject: [pro_vb] Re: Limiting rows returned


"I'm querying an Access database using ADO. I want to limit the number of
rows returned from a query. Is there a way to do this?..."

I believe that traditionally the T-SQL keyword 'WHERE' is used to achieve
such a result ;-)

Sorry Mark, but I couldn't resist and it's a slow Wednesday....

andy






  Return to Index