If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Corel Paradox > How to suppress exceeding number of records

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-25-03, 16:45
H303 H303 is offline
Registered User
 
Join Date: Feb 2003
Location: South Germany
Posts: 3
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
Reply With Quote
  #2 (permalink)  
Old 02-25-03, 17:05
andrewst andrewst is offline
Moderator.
 
Join Date: Sep 2002
Location: UK
Posts: 5,171
Re: How to suppress exceeding number of records

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

WHERE ROWNUM <= 25
__________________
Tony Andrews
http://tinyurl.com/tonyandrews
Reply With Quote
  #3 (permalink)  
Old 02-26-03, 01:50
H303 H303 is offline
Registered User
 
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On