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. Database & SysAdmin
  3. Database
  4. Query Problem

Query Problem

Scheduled Pinned Locked Moved Database
databasehelp
3 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.
  • R Offline
    R Offline
    ragavan
    wrote on last edited by
    #1

    Hi I have the following table with the values Name Number username displayname kind path gane 0 ganesh gane 0 \Root\ bane2 0 ganesh bane2 1 \Root\gane aane2 0 ganesh aane2 0 \Root\ hane1 0 ganesh hane1 1 \Root\gane I need a query which will give the output Name Number username displayname kind path aane2 0 ganesh aane2 0 \Root\ bane2 0 ganesh bane2 1 \Root\gane hane1 0 ganesh hane1 1 \Root\gane gane 0 ganesh gane 0 \Root\ Thanks in advance

    P T 2 Replies Last reply
    0
    • R ragavan

      Hi I have the following table with the values Name Number username displayname kind path gane 0 ganesh gane 0 \Root\ bane2 0 ganesh bane2 1 \Root\gane aane2 0 ganesh aane2 0 \Root\ hane1 0 ganesh hane1 1 \Root\gane I need a query which will give the output Name Number username displayname kind path aane2 0 ganesh aane2 0 \Root\ bane2 0 ganesh bane2 1 \Root\gane hane1 0 ganesh hane1 1 \Root\gane gane 0 ganesh gane 0 \Root\ Thanks in advance

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      I assume you are wanting to sort on the name column here. If so, add ORDER BY Name to the end of your select.

      Please visit http://www.readytogiveup.com/ and do something special today. Deja View - the feeling that you've seen this post before.

      1 Reply Last reply
      0
      • R ragavan

        Hi I have the following table with the values Name Number username displayname kind path gane 0 ganesh gane 0 \Root\ bane2 0 ganesh bane2 1 \Root\gane aane2 0 ganesh aane2 0 \Root\ hane1 0 ganesh hane1 1 \Root\gane I need a query which will give the output Name Number username displayname kind path aane2 0 ganesh aane2 0 \Root\ bane2 0 ganesh bane2 1 \Root\gane hane1 0 ganesh hane1 1 \Root\gane gane 0 ganesh gane 0 \Root\ Thanks in advance

        T Offline
        T Offline
        TomGarth
        wrote on last edited by
        #3

        In looking at your data sorting wish, the only organization I see that makes any sense is to sort like "ORDER BY LEN([Name]) DESC, [Name] ASC".

        Tom Garth Developer R. L. Nelson and Associates, Inc., Virginia

        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