MS SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsDatabasesMS SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 15th, 2003, 02:30 AM
BettyB BettyB is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 3 BettyB User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Problem with ordering of numbers (ORDER BY)

Hi

I have the following problem. I am retreiving chapternumbers from a database, and want to sort them in ascending order. Using the "ORDER BY fieldname ASC" works fine until i get subchapters. These subchapters are like this:
1.1
1.2
1.3a
1.3b
etc...

So far the sorting is fine. However, when i get ten or more subchapters like 1.10, 1.11, 1.12 etc, it seems to be registered like 1.1, and end up at the top like this:

1.1
1.10
1.11
1.12
1.2
1.3
etc..

Anybody that knows a solution to this problem. (My site is created with ASP)

Reply With Quote
  #2  
Old October 20th, 2003, 10:26 AM
don_sparko's Avatar
don_sparko don_sparko is offline
Digitally Challenged
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 280 don_sparko User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 54 m 14 sec
Reputation Power: 11
try listing your chapter number like this as text
1.01
1.02
1.03
1.04
1.05
1.06
1.07
1.08
1.09
1.10
__________________
My brain cells are like a storm trooper's armor: useless

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMS SQL Development > Problem with ordering of numbers (ORDER BY)

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap