Solved

Select top 1000 * from Loan" (assume default SQL installation) and I notice that it does not come back

Posted on 2011-02-24
6
381 Views
Last Modified: 2012-05-11
When doing...
Select top 1000 * from Loan" (assume default SQL installation) and I notice that it does not come back.
What common solution might I try next to "remedy" the problem?  
And what might be the problem?
0
Comment
Question by:tesla764
6 Comments
 
LVL 26

Expert Comment

by:tigin44
ID: 34971312
can you clarify? what is your problem?
0
 
LVL 92

Expert Comment

by:Patrick Matthews
ID: 34971317
Please explain what you mean by "it does not come back"
0
 
LVL 39

Accepted Solution

by:
lcohan earned 500 total points
ID: 34971322
Select top 1000 * from Loan"

should give you a syntax error however


Select top 1000 * from Loan

should work but better add a where clause and with (nolock) hint like below:

Select top 1000 * from Loan with(nolock) where loan_date = ......
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 

Author Comment

by:tesla764
ID: 34971437
We are on a highly transactional SQL Server, By not coming back I mean no data is returned after executing the query "Select top 1000 * from a table called Loan"
0
 
LVL 26

Expert Comment

by:tigin44
ID: 34971465

did you check the blocking processes?

issue an sp_who2 command and check the results...
0
 
LVL 15

Expert Comment

by:Aaron Shilo
ID: 34972477
try this : Select top 1000 * from Loan With(nolock)

im assuming your not reciving any error message
0

Featured Post

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

Introduced in Microsoft SQL Server 2005, the Copy Database Wizard (http://msdn.microsoft.com/en-us/library/ms188664.aspx) is useful in copying databases and associated objects between SQL instances; therefore, it is a good migration and upgrade tool…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

757 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

18 Experts available now in Live!

Get 1:1 Help Now