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. Record Number ...

Record Number ...

Scheduled Pinned Locked Moved Database
oraclequestion
4 Posts 4 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
    RJS
    wrote on last edited by
    #1

    Hi, I would like to know if it is possible to do something like these: 1) select field1,field2 from table_name where line_number_in_table >50 and line_number_in_table < 100 in sql2000? So I would get only those records between the 50 and the 100.. 2) Is there any similar command in sql2000 for rownum in Oracle? Thanks a million!

    D D 2 Replies Last reply
    0
    • R RJS

      Hi, I would like to know if it is possible to do something like these: 1) select field1,field2 from table_name where line_number_in_table >50 and line_number_in_table < 100 in sql2000? So I would get only those records between the 50 and the 100.. 2) Is there any similar command in sql2000 for rownum in Oracle? Thanks a million!

      D Offline
      D Offline
      David Salter
      wrote on last edited by
      #2

      RJS wrote: 2) Is there any similar command in sql2000 for rownum in Oracle? Select top xxx * from tablename e.g. select top 10 * from authors

      N 1 Reply Last reply
      0
      • D David Salter

        RJS wrote: 2) Is there any similar command in sql2000 for rownum in Oracle? Select top xxx * from tablename e.g. select top 10 * from authors

        N Offline
        N Offline
        Not Active
        wrote on last edited by
        #3

        That will only get the top 10 rows. You would need to use your index( if you have one) to select the rows. select * from table where index > 50 and index < 100 This assumes that the index is numberic and sequential.

        1 Reply Last reply
        0
        • R RJS

          Hi, I would like to know if it is possible to do something like these: 1) select field1,field2 from table_name where line_number_in_table >50 and line_number_in_table < 100 in sql2000? So I would get only those records between the 50 and the 100.. 2) Is there any similar command in sql2000 for rownum in Oracle? Thanks a million!

          D Offline
          D Offline
          Daniel Turini
          wrote on last edited by
          #4

          RJS wrote: 1) select field1,field2 from table_name where line_number_in_table >50 and line_number_in_table < 100 in sql2000? No. You need a real column. BTW, in SQL, in general, it's a bad practice to assume a physical order of records in a query. RJS wrote: Is there any similar command in sql2000 for rownum in Oracle? No, but you can fake it. I see dumb people

          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