Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 28th, 2005, 10:43 PM
Authorized User
 
Join Date: Jul 2004
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Default sort by question

I am trying to set up a sql statement to get a recordset from a database that sorts the recordset by three different fields, the first being rank the second being year and the third being month rank is ascending and year and month are descending - for some reason I cant figure out the correct syntax for the order by ....

sqlstr = "SELECT * FROM Press where press_active = true order by ???

any ideas...thanks

 
Old March 29th, 2005, 11:12 AM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

Your sql string is confusing. Do you mean?:

sqlstr = "SELECT * FROM Press where press_active = <something>
          ORDER BY rank asc, year desc, month desc"






Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple sort question garybetz XSLT 2 October 27th, 2007 12:52 PM
xsl:sort Question kwilliams XSLT 6 July 18th, 2005 08:39 AM
Date/Time Sort Question Pam S Access 2 April 23rd, 2005 09:18 AM
Sort order Question Tere Crystal Reports 1 February 14th, 2005 03:18 PM
Sort Method question rgalehouse Javascript 1 February 10th, 2004 07:03 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.