Forums

This topic is locked

Is it piossible to sort by two fields.

Posted 16 Jul 2002 14:08:28
1
has voted
16 Jul 2002 14:08:28 Russell Marshall posted:
On a clothing site for example.

Is it possible to create a recordset that will sort by "size" then "price".

To perform 1 sort is easy but does anyone know what code needs to be added to the sort to allow the secondary sort to work.

ASP/ACCESS/VBSCRIPT

Best Regards

Davrus

Replies

Replied 16 Jul 2002 16:00:45
16 Jul 2002 16:00:45 Vince Baker replied:
IN your recordset sql enter this

ORDER BY Size ASC, Price ASC

To reverse the order replace ASC with DESC

Replied 17 Jul 2002 08:15:22
17 Jul 2002 08:15:22 aegis kleais replied:
And be careful if you're using a SQL DB cause some datatypes CANNOT be used in an ORDER BY clause.

Aegis Kleais
New Media Web Developer
(DWMX : IIS5.1 : SQL2K : WXP : ASP[VB/JS])

Reply to this topic