You are here: Re: Advance Order By « PHP SQL « IT news, forums, messages
Re: Advance Order By

Posted by Bob Stearns on 10/24/06 21:44

DarthDubroc wrote:
> Hi My Name is Danny,
>
> I have a problem with the Order By Clause.
>
> My scenario is that I have Varible Data inside a Table ie: A123, B123,
> 1, 2 , 10, 11,13, 33
> (this is just Pseudo)
> Well when I do an Order By Clause it checks the numbers and The
> Alphabets. The Alphabets with the numbers Work accordingly but the
> numbers are different. It checks the Numbers ie: 1, 10, 11, 13, 2, 33.
> Do you think that you can help me out with this Situation. I think I
> have to do some sort of Advance Order By Clause. The only problem is
> that I do not know how. Another solution is the Case Function. I just
> started working with SQL and I'm very Intermediate with this Program.
> If you can help Thx in advance, If not thx for reading this email and
> giving me some of your needed time.
>
> Thank you ,
>
No, you need to put numeric data in numeric columns not CHARACTER (or
VARCHAR or similar) columns. There is no general way to sort a mixed
numeric and alphabetic data set so the numbers are properly sorted.
Leading zeroes (or spaces) so that everything lines up will help: 01,
02, 10, 11, 13, 33. But, more generally, does AA11BB come before or
after AA2BB?

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация