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.
| Author |
Topic |
|
Robert London
Starting Member
26 Posts |
Posted - 2010-08-07 : 05:36:43
|
| Hi,Could anyone help me with a query to check the number of rows processed on a query I have running?Thanks, |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2010-08-07 : 06:08:51
|
select @@rowcount will give you the number of rows affected by the query KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
Robert London
Starting Member
26 Posts |
Posted - 2010-08-07 : 06:16:05
|
| What would the full query be? |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2010-08-07 : 07:45:19
|
1) SET @Variable = @@ROWCOUNT2) SELECT @Variable = @@ROWCOUNT N 56°04'39.26"E 12°55'05.63" |
 |
|
|
slimt_slimt
Aged Yak Warrior
746 Posts |
Posted - 2010-08-07 : 12:47:46
|
try this:the second select will hold number of rows returned from first query. you can insert values from @@rowcount into table for auditing purposes.select * from MyTableselect @@rowcount |
 |
|
|
|
|
|