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 |
|
a_r_satish
Yak Posting Veteran
84 Posts |
Posted - 2006-03-04 : 01:49:26
|
| Hi I have a stored procedure. which has multiple selects,inserts and deletes.In the same sp i have to insert the count of rows affected to a table.for ex : when i execute the delete command then, the rows deleted is returned.so is there a way to move the rows deleted to a local variable and then populate my table using the values filled in local variale.i don want to use the count(*).thanks in advance.Regards,satish.r |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-03-04 : 02:17:12
|
"so is there a way to move the rows deleted to a local variable and then populate my table using the values filled in local variale."you mean number of rows deleted ?declare @rows_delete intdelete from yourtableselect @rows_delete = @@rowcountselect @rows_delete ----------------------------------'KH' |
 |
|
|
a_r_satish
Yak Posting Veteran
84 Posts |
Posted - 2006-03-04 : 03:36:40
|
| Ya that was what i wanted.ThanksRegards,satish.r |
 |
|
|
|
|
|