User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MySQL section within the Web Development category of DaniWeb, a massive community of 402,909 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,088 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MySQL advertiser: Programming Forums
Views: 929 | Replies: 2
Reply
Join Date: Jun 2006
Posts: 7
Reputation: xibnoe is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
xibnoe xibnoe is offline Offline
Newbie Poster

Help order by....

  #1  
Jan 13th, 2007
i have a fied (book_number), the value is "aaa.bbbb.cccc.ddd", How can i sort the result order only by "bbbb" and ignore a, c, and d.

thanks
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Mar 2006
Posts: 1
Reputation: fleetwood is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
fleetwood fleetwood is offline Offline
Newbie Poster

Re: order by....

  #2  
Jan 14th, 2007
Originally Posted by xibnoe View Post
i have a fied (book_number), the value is "aaa.bbbb.cccc.ddd", How can i sort the result order only by "bbbb" and ignore a, c, and d.

thanks

Try using the SUBSTRING() function in the ORDER BY
Reply With Quote  
Join Date: Jun 2006
Posts: 7
Reputation: xibnoe is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
xibnoe xibnoe is offline Offline
Newbie Poster

Re: order by....

  #3  
Jan 14th, 2007
the problem is the length of a,b,c,b always change (not same ) in every data. ex:
Kjs.231.6753.55
HHSp.23322.4423.11
Last edited by xibnoe : Jan 14th, 2007 at 9:23 pm.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb MySQL Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the MySQL Forum

All times are GMT -4. The time now is 3:42 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC