Professional Web Applications Themes

sorting alphanum colum .. - MySQL

happy visitors of Paris know about the 'arrondissement', an administrative division of the city... 20 selecting them from a city database brings them as 'Paris 1' , 'Paris 10' , 'Paris 11' , ..... 'Paris 19' , 'Paris 2' , 'Paris 20' , 'Paris 3' , .... 'Paris 9' is there any way to get them ordered as : 'Paris 1' , 'Paris 2' , 'Paris 3' , .... 'Paris 9' , 'Paris 10' , 'Paris 11' , ..... 'Paris 19' , 'Paris 20' if not I'll sort the results after selection... :-((( thanks for your lights joss...

  1. #1

    Default sorting alphanum colum ..

    happy visitors of Paris know about the 'arrondissement', an
    administrative division of the city... 20
    selecting them from a city database brings them as

    'Paris 1' , 'Paris 10' , 'Paris 11' , ..... 'Paris 19' , 'Paris 2' ,
    'Paris 20' , 'Paris 3' , .... 'Paris 9'

    is there any way to get them ordered as :
    'Paris 1' , 'Paris 2' , 'Paris 3' , .... 'Paris 9' , 'Paris 10' ,
    'Paris 11' , ..... 'Paris 19' , 'Paris 20'

    if not I'll sort the results after selection... :-(((

    thanks for your lights

    joss


    Josselin Guest

  2. #2

    Default Re: sorting alphanum colum ..


    Josselin wrote:
     

    Remove 'Paris' from the arrondissement field

    strawberry Guest

  3. #3

    Default Re: sorting alphanum colum ..

    "strawberry" <com> wrote in news:1166629014.665983.254180
    i12g2000cwa.googlegroups.com:
     
    >
    > Remove 'Paris' from the arrondissement field[/ref]

    and make the arrondissement field a numeric field (unsigned 'mediumint'
    will probably do)
    Good Guest

  4. #4

    Default Re: sorting alphanum colum ..

    Good Man wrote:
     
    >>
    >>Remove 'Paris' from the arrondissement field[/ref]
    >
    >
    > and make the arrondissement field a numeric field (unsigned 'mediumint'
    > will probably do)[/ref]

    or modify your data 'Paris 1', 'Paris 11' or 'Paris 001', 'Paris 011', Paris 100'

    --
    Michael Austin.
    Database Consultant
    Michael Guest

  5. #5

    Default Re: sorting alphanum colum ..

    On 2006-12-20 16:36:54 +0100, "strawberry" <com> said:
     
    >
    > Remove 'Paris' from the arrondissement field[/ref]

    thanks fya but over 40'000 cities in the table only 3 have
    arrondissements (Paris -> 20, Mille -> 16 and Lyon -> 9)
    which is a very very low percentage...
    I assume thet tah solution is sorting raw SQL output in an array , Ruby
    can do that easily...

    joss

    Josselin Guest

Similar Threads

  1. new colum
    By Bishoy George in forum ASP.NET Data Grid Control
    Replies: 4
    Last Post: November 21st, 07:56 AM
  2. Datagrid colum has no Dataformat property
    By ree32 in forum ASP.NET Data Grid Control
    Replies: 2
    Last Post: February 17th, 09:29 PM
  3. datagrid, paging and editcommand colum
    By Venkat Chellam in forum ASP.NET Data Grid Control
    Replies: 6
    Last Post: November 15th, 06:08 PM
  4. Colum names.
    By Paul in forum Microsoft SQL / MS SQL Server
    Replies: 0
    Last Post: July 2nd, 08:44 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139