Help with sorting... please.. :)

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default Help with sorting... please.. :)

    I'm trying to sort the output of a query.. and I know you can use the
    "order by" clause, but it doesn't work the way I want it to.

    I'm trying to sort a list of prices, but when I do it gives me
    something like this:

    1.15
    11.25
    2.29
    205.79
    5.99
    529.95

    How can I make it so it actually goes from lowest to highest priced?

    Thanks in advance!

    Sarah

    Sarah Guest

  2. Similar Questions and Discussions

    1. Sorting array vs sorting paginated array
      ....pulling in a long list of photos in a gallery, and I have a sort function working within the pages of data fine. I need to bring it back out of...
    2. sorting
      Gary, Please repost WITHOUT the attachment. Many of us use dialup and downloading 1433 lines wastes a lot of our time - especially since very...
    3. Sorting XML
      I have an XML file (see code set below) and I wish to sort by the "title" attribute. Now, I am completely lost on XSLT (XSL). I know there is a XSL...
    4. Sorting in CGI
      Hi, I am writing a form that will list the name in the file namedata.dat in alphabetical order and display in a web page. #!/usr/bin/perl use...
    5. Sorting in SQL
      ORDER BY CASE WHEN ISNUMERIC(client_code) = 1 THEN CAST(client_code AS INT) END, CASE WHEN ISNUMERIC(client_code) = 0 THEN client_code END ...
  3. #2

    Default Re: Help with sorting... please.. :)

    It appears that you are storing the values in some kind of text field (which
    would explain the ordering), since 200 comes before 5 in such a case.

    Change the field type in your database to "decimal", or whatever your
    database calls it.

    Cheers
    Ken

    "Sarah" <saralicious@/nospam/hotmail.com> wrote in message
    news:te4nhv8f83o2aakuggh1bcdtilr7so52cc@4ax.com...
    : I'm trying to sort the output of a query.. and I know you can use the
    : "order by" clause, but it doesn't work the way I want it to.
    :
    : I'm trying to sort a list of prices, but when I do it gives me
    : something like this:
    :
    : 1.15
    : 11.25
    : 2.29
    : 205.79
    : 5.99
    : 529.95
    :
    : How can I make it so it actually goes from lowest to highest priced?
    :
    : Thanks in advance!
    :
    : Sarah
    :


    Ken Schaefer Guest

Posting Permissions

  • You may not post new threads
  • You may 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