Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 Other Topics
 Sorting by priority with MySQL

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-12-21 : 09:42:38
David writes "I am trying to get my addressbook to sort first by LASTNAME, and then by FIRSTNAME, both in ascending order. Right now I am only sorting by LASTNAME in ascending order.
Here is my code:

Dim CmdShowEntries
Dim MySQL

'** Get initial recordset
Set CmdShowEntries = Server.CreateObject("ADODB.Recordset")
MySQL = "SELECT BOOK1.* FROM BOOK1 ORDER BY LASTNAME ASC"
CmdShowEntries.Open MySQL,ConnAddressBook_ConnectionString, 3


What do I need to add so that I can achieve the goal?"

robvolk
Most Valuable Yak

15732 Posts

Posted - 2001-12-21 : 09:48:21
MySQL = "SELECT BOOK1.* FROM BOOK1 ORDER BY LASTNAME ASC, FIRSTNAME ASC"

Unless mySQL has a really bizarre ORDER BY syntax that should do it.

Go to Top of Page
   

- Advertisement -