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)
 Insert count

Author  Topic 

Finarfin
Starting Member

28 Posts

Posted - 2004-06-28 : 05:13:29
Hello,

I am using stored procedures that insert datas. I need to catch the number of datas inserted (exactly like when using the query analyser).

I know I can use an integer variable for count, but is there any other way to count inserts ?



Thank you all,
Romain

Wanderer
Master Smack Fu Yak Hacker

1168 Posts

Posted - 2004-06-28 : 05:34:24
insert into tableX select * from tableY
select @@rowcount

The @@rowcount should tell you how many rows were inserted into tableX.

HTH

*##* *##* *##* *##*

Chaos, Disorder and Panic ... my work is done here!
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2004-06-28 : 05:35:38
maybe with rowcount?? you would need something like global rowcount... :)

Go with the flow & have fun! Else fight the flow :)
Go to Top of Page

Finarfin
Starting Member

28 Posts

Posted - 2004-06-28 : 05:38:17
Oki, thank you!!!
Have a good week :)

Thank you all,
Romain
Go to Top of Page
   

- Advertisement -