Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Returning Top Records in SQL

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-03-26 : 09:08:50
Chris writes "We have discovered that in certain databases, we do not have the ability to utilize the TOP command. This occurs when right clicking on the table, the only option we recieve is Return All Rows and Return Top is grayed out, however other databases on the same SQL Server machine allow selecting TOP. The database that will not allow this is the backend for our membership application, but I assume that if they can turn it off, I should be able to turn it on??

Thanks.

Chris"

robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-03-26 : 09:24:06
Your database is probably set to a compatability level, either 6.0 or 6.5, which don't support TOP. You can use SET ROWCOUNT in Query Analyzer to restrict the number of rows. The only other method is to change the compatability level...BE ABSOLUTELY SURE THAT YOU WANT TO DO THIS...it may cause procedures and such to not work the same.

Books Online has details on compatability levels and how to change them...read up on it for the possible side effects before you do it.

Go to Top of Page
   

- Advertisement -