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. Is there any alternative function for Rank() or Row_Number() in sql server 2000?

Is there any alternative function for Rank() or Row_Number() in sql server 2000?

Scheduled Pinned Locked Moved Database
databasesql-serversysadminquestion
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.
  • A Offline
    A Offline
    Ashish Kumar Vyas
    wrote on last edited by
    #1

    I am using Rank() function in my VIEW. it working in sql2005 but not in sql2000. Is there any alternative function for Rank() or Row_Number() in sql server 2000?

    M 1 Reply Last reply
    0
    • A Ashish Kumar Vyas

      I am using Rank() function in my VIEW. it working in sql2005 but not in sql2000. Is there any alternative function for Rank() or Row_Number() in sql server 2000?

      M Offline
      M Offline
      Mycroft Holmes
      wrote on last edited by
      #2

      No You can simulate it using a cursor and identity field

      Never underestimate the power of human stupidity RAH

      A 1 Reply Last reply
      0
      • M Mycroft Holmes

        No You can simulate it using a cursor and identity field

        Never underestimate the power of human stupidity RAH

        A Offline
        A Offline
        Ashish Kumar Vyas
        wrote on last edited by
        #3

        Could you give a sample example for the same?

        M T 2 Replies Last reply
        0
        • A Ashish Kumar Vyas

          Could you give a sample example for the same?

          M Offline
          M Offline
          Mycroft Holmes
          wrote on last edited by
          #4

          Sorry mate you are going to have to do the work yourself, I am willing point the way not do the work. Besides I use 2005 why would i code for 2000.

          Never underestimate the power of human stupidity RAH

          1 Reply Last reply
          0
          • A Ashish Kumar Vyas

            Could you give a sample example for the same?

            T Offline
            T Offline
            Tripathi Swati
            wrote on last edited by
            #5

            hey try this Select IDENTITY(int,1,1) AS [Row Number], FieldName INTO #Temp from EMPtable order by FieldName DESC SELECT * FROM #Temp WHERE [Row Number] = 10 hope this will help you.

            Reasons are not Important but Results are Important. Swati

            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