p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

pro_vb thread: Sorting a field by string length


Message #1 by "Dr Gordon Atherley" <atherley@s...> on Sun, 22 Apr 2001 16:54:32 -0400
Good day
 
Thanks to all for the help with this question. I've found that the
following works well with ~3,700 records in Access 2000 when executed
from VB.
 
"SELECT Id, Name FROM Data ORDER BY Len(Id) DESC, Id DESC"
 
It produces a recordset in descending order of the length of the ID
string. Secondarily, the ID strings are arranged in alpha-numeric
descending order.
 
Gordon


  Return to Index