Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: Re: [proasp_codeclinic] Top 5 sellers from database ****


Message #1 by DONTHIREDDY SRINIVAS <dreddy_in@y...> on Thu, 14 Sep 2000 22:15:04 -0700 (PDT)
I want to top 5 sellers from a database. 

can you help me...







Message #2 by Chris Neale <Chris.Neale@s...> on Fri, 15 Sep 2000 12:23:58 +0100
Are you sure you want to top them? I mean, if they're good sellers then they

don't deserve to be killed, surely?



Umm.. Anyway.. just get the 'sales' from the database in the right order and

use the first 5 records.. Something like 'SELECT * FROM sales ORDER BY value

DESC'. To limit your page to the first 5 records either use a for...next

loop that goes round 5 times, or else use the recordset.absolutepage

method..



Chris 



Chaos! Panic! Disaster! (My work here is done)

Chris Neale. Web/Wap Developer

Chris.neale@s... <mailto:Chris.neale@s...> 

www.sparkresponse.co.uk



	-----Original Message-----

	From:	DONTHIREDDY SRINIVAS [SMTP:dreddy_in@y...]

	Sent:	Friday, September 15, 2000 7:30 PM

	To:	ASP Databases

	Subject:	[asp_databases] Re: [proasp_codeclinic] Top 5

sellers from database ****



	I want to top 5 sellers from a database. 

	can you help me...







Message #3 by "Mark Morgan" <mark.morgan@v...> on Fri, 15 Sep 2000 16:03:10 +0100
If you are using SQL Server you can do SET ROWCOUNT 5 SELECT (rest of query)



-----Original Message-----

From: Chris Neale [mailto:Chris.Neale@s...]

Sent: 15 September 2000 12:24

To: ASP Databases

Subject: [asp_databases] Re: [proasp_codeclinic] Top 5 sellers from da

tabase ****





Are you sure you want to top them? I mean, if they're good sellers then they

don't deserve to be killed, surely?



Umm.. Anyway.. just get the 'sales' from the database in the right order and

use the first 5 records.. Something like 'SELECT * FROM sales ORDER BY value

DESC'. To limit your page to the first 5 records either use a for...next

loop that goes round 5 times, or else use the recordset.absolutepage

method..



Chris



Chaos! Panic! Disaster! (My work here is done)

Chris Neale. Web/Wap Developer

Chris.neale@s... <mailto:Chris.neale@s...>

www.sparkresponse.co.uk



	-----Original Message-----

	From:	DONTHIREDDY SRINIVAS [SMTP:dreddy_in@y...]

	Sent:	Friday, September 15, 2000 7:30 PM

	To:	ASP Databases

	Subject:	[asp_databases] Re: [proasp_codeclinic] Top 5

sellers from database ****





	I want to top 5 sellers from a database.

	can you help me...










  Return to Index