List:General Discussion« Previous MessageNext Message »
From:Gerald Clark Date:February 1 2002 2:39pm
Subject:Re: problem sorting integer
View as plain text  
Is it a character field?
If it is it will be an ascii sort, not a numeric sort.
Try:
select personal_id+1 as id from Emp_table order by  id desc

Vishakha Mali_Wagh wrote:

>Hi all,
>
>I have been using mysql since long time.  But suddenly I noticed that, there is no
> function for sorting intervalues from the tabel.
>Clarifying more....
>If I have a set of employee numbers and i need to sort them in descending order, I
> found that it gives erroneous results.
>The query is:
>select personal_id from Emp_table order by personal_id DESC
>
>
>Am I missing something or do i need to write the query differently? Please help.
>Regards,
>-vishakha. 
>
>
>---------------------------------------------------------------------
>Before posting, please check:
>   http://www.mysql.com/manual.php   (the manual)
>   http://lists.mysql.com/           (the list archive)
>
>To request this thread, e-mail <mysql-thread98251@stripped>
>To unsubscribe, e-mail
> <mysql-unsubscribe-gerald_clark=suppliersystems.com@stripped>
>Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>


Thread
problem sorting integerVishakha Mali_Wagh1 Feb
  • Re: problem sorting integerRon Beck1 Feb
  • Re: problem sorting integerGerald Clark1 Feb
    • Re: problem sorting integerPaul DuBois1 Feb