Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sorting problem

Status
Not open for further replies.

Jonah86

Programmer
Dec 11, 2003
152
US
I have an issue with a program I'm writing. I need to sort a list of projects by the project number. The problem I'm facing is that the "numbers" are formatted as follows: ###/##-###.#.# and of course if I have one say 500/00-125 and another 500/00-50, the 50 is going to come before the 125. This is a problem for the people using the program. I was wondering if there was any way to sort these numbers better.

I'm just using 'ORDER BY projectnum', as it's the only way I know how to do it.

I'm using MySQL and connecting it to a Delphi program via BDE if any of that matters to you.

Thanks
 
if you're format is ###/##-###.#.#
then the numbers should be

500/00-050
500/00-125

and then everything should be right in the ordering
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top