• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 726
  • Last Modified:

SQL: how to limit number of records in select?

I'm using paradox tables.  I wish to limit the number of returned records from a SQL select satement (the first 40 records) with varying ORDER BY parameters.
Can I do this?
1 Solution
you can add to select a count command

select * from table1 order by field where count<41
the only way to do this is that you add a field in your end query  and use a statement in where

where field <= 40

im not sure if in delphi exists the recno() function , is similar the use

It's difficult to do that use only SQL in Paradox,Easy in Oracle & Ms SQL.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now