Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have a table called XXX. When put select query in query window for the table, It is not returning any values rather than it is running continously.

select works fine for others tables which are there in the same db.i am having the problem only on particular table..
Posted
Comments
CHill60 23-Jan-13 6:00am    
Use the "Improve question" widget and post the query

1 solution

the table is most likely locked. Try this trick to retrieve dirty data

SQL
SELECT TOP 100 * FROM XXX (NOLOCK)


Read about the query hints here[^]

You can experiment with FAST hint that allows to select fast first n rows:

Quote:
FAST number_rows

Specifies that the query is optimized for fast retrieval of the first number_rows. This is a nonnegative integer. After the first number_rows are returned, the query continues execution and produces its full result set.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900