Affected rows of a delete query

How to get affected rows in a SQL delete. Like we do @@ROWCOUNT in SQL server.

I can do a count(*) before and after SQL delete  but is there any other efficient way?


Thanks in advance.

Hi Lakshmi,

Iirc, you need an Output Structure with a single Integer Attribute, and add

; SELECT @@ROWCOUNT

after the DELETE statement.

Kilian Hekhuis wrote:

Hi Lakshmi,

Iirc, you need an Output Structure with a single Integer Attribute, and add

; SELECT @@ROWCOUNT

after the DELETE statement.

Thanks for the response Kilian .

I am getting the unknown ROWCOUNT error now.


Solution

Hi Iakshmi,

Try injecting the @@ROWCOUNT parameter like this:

And make sure Expand Inline is set to Yes.

Solution

Afonso Carvalho wrote:

Hi Iakshmi,

Try injecting the @@ROWCOUNT parameter like this:

And make sure Expand Inline is set to Yes.


Thank you very much Afonso. Its working.