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
 Transact-SQL (2000)
 Made a discovery on SET ROWCOUNT

Author  Topic 

Stoad
Freaky Yak Linguist

1983 Posts

Posted - 2005-01-27 : 06:12:35
From BOL of SS 7.0:

The SET ROWCOUNT limit applies to building the rows in the result set
before an ORDER BY is evaluated. Even if ORDER BY is specified, the SELECT
statement is terminated when n rows have been selected. n rows are selected,
then ordered
and returned to the client.
================================

i never know it.......

btw, jeff's solution for fast paging "problem"...... how it goes with the above quote?

Merkin
Funky Drop Bear Fearing SQL Dude!

4970 Posts

Posted - 2005-01-27 : 07:59:33
wow, I wish I had an SQL 7 box to test that on. It definitely doesn't work like that in 2000.

I know that I have used SET ROWCOUNT on SQL 7 in the past, and the result always looked right.


Damian
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2005-01-27 : 08:05:12
Didn't in v7 either.
At one point it was an error in bol but that was fixed a long time ago.
set rowcount works the same as top.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

Stoad
Freaky Yak Linguist

1983 Posts

Posted - 2005-01-27 : 08:36:51
this is it... "bug" in bol... lol
Go to Top of Page
   

- Advertisement -