Solved

How to limit how many rows I wish to get

Posted on 1998-07-14
4
169 Views
Last Modified: 2010-03-19
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
Comment
Question by:gljsentvid16
  • 2
4 Comments
 
LVL 2

Accepted Solution

by:
connex earned 200 total points
ID: 1091745
Just have a look into the SQL-help .)

SET ROWCOUNT 100
SELECT * FROM TABLE

Will limit the returned rows to 100


0
 

Author Comment

by:gljsentvid16
ID: 1091746
Not working, I'm using InterBase SQL server!
0
 
LVL 2

Expert Comment

by:connex
ID: 1091747
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
 
LVL 1

Expert Comment

by:mativare
ID: 1091748
Try
Select Top 100 from mytable
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now