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

How to limit how many rows I wish to get

I have a huge database and also huge query. I would like to
add a possibility to limit a report of let's say 100 rows.
As I have tried with count() it took a half an hour till I
have had enough and had killed a process.
What to do?
0
gljsentvid16
Asked:
gljsentvid16
  • 2
1 Solution
 
connexCommented:
Just have a look into the SQL-help .)

SET ROWCOUNT 100
SELECT * FROM TABLE

Will limit the returned rows to 100


0
 
gljsentvid16Author Commented:
Not working, I'm using InterBase SQL server!
0
 
connexCommented:
Hmm well then I cant help you other, than suggesting using count (like you tried already), as I don't know anything about the IB SQL, sorry. Just reject my answer, and maybe state such things in your question next time.

0
 
mativareCommented:
Try
Select Top 100 from mytable
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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