As documented, when using INSERT ... ON EXISTING SKIP, the value of @@ROWCOUNT still does count all rows from the source table:
Is there a possibility to get only the count of the really inserted rows (besides merely counting the tables's rows before and after the statement)?
If not, is this considered as a future enhancement?
(FWIW, I'm using SA 184.108.40.20601.)
asked 20 Jan '11, 10:04
The enhancement you are suggesting seems quite reasonable if you are using "EXISTING SKIP" since the @rowcount is supposed to be the number of rows affected. I will open an enhancement request and we will try and get the enhancement in place for a future release.
answered 20 Jan '11, 15:16