Forum Discussion

Marco's avatar
Marco
Contributor II
2 days ago

SQL table editor show only 100 rows

Hi everyone.

I would like to know if there is a way to display only a certain number of rows in an SQL TABLE EDITOR, as I do not see a way to set it up as in a query, for example.

SELECT TOP 5 * FROM Table;

I would appreciate it if you could assist me with this.

  • victortei's avatar
    victortei
    New Contributor III

    Hi Marco,

    You have two options to achieve your goal, but neither will allow you to edit the records—only to view them:

    1. Using a Grid View instead of a SQL Table Editor is the easiest option. The downside is that you cannot edit records in a Grid View. However, you can limit the number of rows in your data adapter.

    2. I’d say this option is a bit more creative. If your table is in the application database, you can create a view to limit the number of rows. Then, in your SQL Table Editor, you can use that view in the WHERE clause.

    In this example, I'm creating a View based on the Member table. Notice that I'm adding the Row_Number field which will help you limit the output:

    CREATE VIEW MemberView AS SELECT *, ROW_NUMBER() OVER (ORDER BY (SELECT NULL)) AS RowNum FROM Member;

    Then, in your SQL Table Editor, you need to query the View and use the Row_Number in the Where Clause:

    Hope this helps!

     

     

     

     

    • Marco's avatar
      Marco
      Contributor II

      Hi victortei.

      I use the following table, XFW_PLP_Register, which contains too many rows, so I am unsure if this could affect performance. However, I have additional values that I use to filter this table, which are listed below. Regarding the use of a grid view, I need to maintain the editing functionality within the element.

      XFW_PLP_Register
      WHERE WFProfileName |!WFProfileCriteria_PLP!| And WFScenarioName = '|WFScenario|' And WFTimeName = '|WFTime|' BRString(PLP_ParamHelper, GetRegCriteria, Status=|!StatusListAll_PLP!|, RegID=|!SelectedRegisterIDDistinct_PLP!|) BRString(PLN_PLP_ParamHelper, GetPLPDeptSecurity, Status=|!StatusListAll_PLP!|)

       

      • victortei's avatar
        victortei
        New Contributor III

        Got it. So, you're using the People Planning Marketplace solution and, of course, want users to be able to edit the content.

        Are you using the standard out-of-the-box dashboard, or are you building something custom?

        Also, what’s the reason for limiting the number of displayed rows? The SQL Table Editor component paginates when there are many records, and you can also adjust the default value of rows per page to something that better suits your needs.