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. How do you separate in pages database results?

How do you separate in pages database results?

Scheduled Pinned Locked Moved Database
databasequestion
2 Posts 2 Posters 3 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.
  • J Offline
    J Offline
    Joan M
    wrote on last edited by
    #1

    Hi, Working in a time tracking program, I've thought of separating results in pages. I think of making a specific SQL query to count the amount of total registers with the applied filters, then call the another SQL query with LIMIT clause to be able to define from which record I want to start showing the results and the amount of results. Is there any better way to do it? Thank you in advance!

    https://www.robotecnik.com freelance robots, PLC and CNC programmer.

    D 1 Reply Last reply
    0
    • J Joan M

      Hi, Working in a time tracking program, I've thought of separating results in pages. I think of making a specific SQL query to count the amount of total registers with the applied filters, then call the another SQL query with LIMIT clause to be able to define from which record I want to start showing the results and the amount of results. Is there any better way to do it? Thank you in advance!

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

      See this article for various ways to return "pages" of data: https://blog.sqlauthority.com/2017/02/26/pagination-sql-server-interview-question-week-111 Alternatively, if you are using a Grid control to display the data, then I believe it has built in paging functionality.

      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