Community > Answers
63 views

How to set page size in Live Visualizer using SQL query and pagination

I have managed to find info in the videos on how to set paging up in the Visualizer when the data source is SQL.

Select *
from (
  Select ROW_NUMBER() over (order by ID) as rownum, *   from members WHERE categories like'%[SelectCategory]%' ) as x
Where rownum between [StartRecord] and [EndRecord]
Order by Member

 

I would like to change the number of items per page to be 20...

How can I accomplish that??

Scott Tremain Scott Tremain
asked 05/27/2021 21:30
Add Comment
Last Activity 07/13/2021 04:07

1 Answer(s)

  • answered 05/28/2021 06:33
    Ashish Pachori
    Add Comment
    Scott Tremain
    replied 07/11/2021 23:02

    This does not work. 

    Using MSSQL Server Profiler I get:

    Select  *
    from (
      Select  ROW_NUMBER() over (order by member) as rownum, *   from members  ) as x
    Where rownum between 01 and 20

    change page I get

    Select  *
    from (
      Select  ROW_NUMBER() over (order by member) as rownum, *   from members  ) as x
    Where rownum between 11 and 20

    Next page query:

    Select  *
    from (
      Select  ROW_NUMBER() over (order by member) as rownum, *   from members  ) as x
    Where rownum between 21 and 20

    The End row value has to increment so it has to be a variable number that is always 20 records above the StartRecord value.  The variable is being set by a formula some where in code. I need to either have a way to change this value or a different way to page the data.

     

    Ashish Pachori
    replied 07/13/2021 04:07

    Please open a support ticket regarding your concern through https://www.mandeeps.com/support/standard so that we can take a look.


    Reply
Add an Answer