Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2003
    Location
    South Germany
    Posts
    3

    Unanswered: How to suppress exceeding number of records

    Is there any way how to limit the number of returned records to a certain value? I have a table which holds millions of measurement data and timestamps. When I do a select for a certain time range, I may get back thousends of records and I only need to present the first 25 for a preview.
    The function COUNT(*) will not work, since I cannot calculat something like ... select where ... COUNT(*) > (COUNT(*) -25)
    Many thanks for every hint!
    Hermann

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1

    Re: How to suppress exceeding number of records

    The answer depends on your DBMS. For Oracle it is:

    WHERE ROWNUM <= 25

  3. #3
    Join Date
    Feb 2003
    Location
    South Germany
    Posts
    3
    Hi Tony,
    many thanks for your fast reply! Sorry I have to use Paradox and Borland C++. ROWNUM does not work with Paradox.
    Regards Hermann

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •