Re: 'ORDER BY' Issues
From: Veign (NOSPAMinveign_at_veign.com)
Date: 09/03/04
- Next message: Aras Kucinskas: "IIS 6.0 ASP.NET Process Identity and ODBC"
- Previous message: Joe: "'ORDER BY' Issues"
- In reply to: Joe: "'ORDER BY' Issues"
- Next in thread: Joe: "Re: 'ORDER BY' Issues"
- Reply: Joe: "Re: 'ORDER BY' Issues"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 3 Sep 2004 00:15:46 -0400
Is the field truly alphanumeric as the sample data you show is all
numerical. If the field in the database is not a numerical type you can try
an on the fly conversion through SQL like:
"SELECT rNum FROM tblData ORDER BY CLng(rNum) DESC"
If you have an alphanumeric field post some of the sample data...
-- Chris Hanscom MVP (Visual Basic) http://www.veign.com -- "Joe" <Joe@discussions.microsoft.com> wrote in message news:BD5C1C6A-279A-42C9-B3BB-58F193B45CAD@microsoft.com... > I have an alphanumeric field I'm trying to sort by, and the query runs > exactly the way it is supposed to. But I was hoping there is a way to change > the way ADO sorts. > > Here is an example of a Query: > "SELECT rNum FROM tblData ORDER BY rNum DESC" > And here are the results: > #7 > 116000 > 1222 > 1256 > 140 > 148999 > 178100 > 186028 > 19260 > 194176 > > As you can see the data is sorted in the way ADO does it, but in an ideal > sort it would look more like: > #7 > 140 > 1222 > 1256 > 19260 > 116000 > 148999 > 178100 > 186028 > 194176 > > I hope this makes sense to someone because I'm not sure how else to show > what I 'm talking about. I'm getting a lot of heat from superiors because of > this little issue and I've only been using ADO for about 6 months now. > > Thanks, > Joe
- Next message: Aras Kucinskas: "IIS 6.0 ASP.NET Process Identity and ODBC"
- Previous message: Joe: "'ORDER BY' Issues"
- In reply to: Joe: "'ORDER BY' Issues"
- Next in thread: Joe: "Re: 'ORDER BY' Issues"
- Reply: Joe: "Re: 'ORDER BY' Issues"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|