How to view only the first 20 lines when creating a crosstab query in Access ? You must use the first 20 entries. Cross inquiry:

 TRANSFORM Count([Копия успеваемость].[ФИО студента]) AS [Count-ФИО студента] SELECT [Копия успеваемость].[№ зачетной книжки] FROM [Копия успеваемость] GROUP BY [Копия успеваемость].[№ зачетной книжки] PIVOT [Копия успеваемость].[ФИО студента]; 
  • 2
    Please clarify the question. Specify which database you are using. And it is very desirable to give an example of the request in question. - newman
  • I do not know what TRANSFORM is, but SELECT TOP 20 should work with simple SELECTs [Copy of progress] ... - Sergey

3 answers 3

For MSSQL, this will be an option with TOP , but in general, various variations can be found here.

 SQL Server / MS Access Syntax SELECT TOP number|percent column_name(s) FROM table_name; MySQL Syntax SELECT column_name(s) FROM table_name LIMIT number; Oracle Syntax SELECT column_name(s) FROM table_name WHERE ROWNUM <= number; 

    For example for MySQL add at the end of the query.

     LIMIT 0,20 LIMIT 20 
    • If I add to the end of my query, I write an error. - Catherine

    Instead of the table [Copy performance], use the query, which will limit the set of records.