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 Development (2000)
 rowcount and loading a temp table

Author  Topic 

sql777
Constraint Violating Yak Guru

314 Posts

Posted - 2005-06-09 : 14:14:51
Hi,

I set the rowcount on the top of the sproc.

Now I load rows from table into a temp table and then select out of that temp table.

Will the ROWCOUNT stop the loading of the temp table at the number of rows ?

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2005-06-09 : 14:17:23
It is best to try things out on your own with a simple test. Then to ask a question if you have some confusion. Try this out:

SET ROWCOUNT 10

SELECT *
INTO #Temp
FROM sysobjects

SELECT *
FROM #Temp

DROP TABLE #Temp

Tara
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2005-06-11 : 10:09:47
And it's important to run
SET ROWCOUNT 0
after that or close the window - before you start thinking there is something wrong with the production data.

==========================================
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
   

- Advertisement -