Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Problem with order by in aspx page

Problem with order by in aspx page

Scheduled Pinned Locked Moved ASP.NET
helpdatabasequestion
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    eyeseetee
    wrote on last edited by
    #1

    Hi I have a query which is ran from my aspx page. The query is ordered by a field which contains the letters 'y' and 'n' Now when the letter is not a capital it orders fine, but when the letter is a capital it doesnt order properly. Why is this? any help would do. thanks

    A B 2 Replies Last reply
    0
    • E eyeseetee

      Hi I have a query which is ran from my aspx page. The query is ordered by a field which contains the letters 'y' and 'n' Now when the letter is not a capital it orders fine, but when the letter is a capital it doesnt order properly. Why is this? any help would do. thanks

      A Offline
      A Offline
      Abhishek Sur
      wrote on last edited by
      #2

      always make it to same case, means either Upper case or Lower case before you order by in the query.

      Abhishek Sur

      E 1 Reply Last reply
      0
      • A Abhishek Sur

        always make it to same case, means either Upper case or Lower case before you order by in the query.

        Abhishek Sur

        E Offline
        E Offline
        eyeseetee
        wrote on last edited by
        #3

        Do you mean in the query? How would I do this? Or do you mean manually change all data? That would be an extreme solution!

        A 1 Reply Last reply
        0
        • E eyeseetee

          Hi I have a query which is ran from my aspx page. The query is ordered by a field which contains the letters 'y' and 'n' Now when the letter is not a capital it orders fine, but when the letter is a capital it doesnt order properly. Why is this? any help would do. thanks

          B Offline
          B Offline
          balaji t
          wrote on last edited by
          #4

          hi give like this order by upper()

          T.Balaji

          1 Reply Last reply
          0
          • E eyeseetee

            Do you mean in the query? How would I do this? Or do you mean manually change all data? That would be an extreme solution!

            A Offline
            A Offline
            Abhishek Sur
            wrote on last edited by
            #5

            Yes.. Its in query... no need to do this manually... But if you like in code ... this would not be a big deal. Have you used LINQ. ..

            Abhishek Sur

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups