• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 185
  • 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
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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

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