How can I getting total affected row in advanced "UPDATE" query by Oracle

Hi

how can I getting total affected row in advanced "UPDATE" or "INPUT" query by Oracle?

Thanks in advance.

Regards

Hi Lucas,

Use Select @@RowCount and an Output parameter of data type int.

Use an input parameter RowCount of data type text and set it to "@@ROWCOUNT"

The assumption here is you use MS SQL Server, if it is Oracle you use let me know, I have to look that up, don't use Oracle myself.

Regards,

Daniel

Daniël Kuhlmann wrote:

Hi Lucas,

Use Select @@RowCount and an Output parameter of data type int.

Use an input parameter RowCount of data type text and set it to "@@ROWCOUNT"

The assumption here is you use MS SQL Server, if it is Oracle you use let me know, I have to look that up, don't use Oracle myself.

Regards,

Daniel

Thanks for your reply. But this solution can't work on Oracle.

Oracle have a command is "SQL%rowcount" like MS SQL's "@@ROWCOUNT".

It can't not used in select statement.


My English is weak, please don't mind.

Hi, try  for Oracle "sql%rowcount" as the input parameter value. 

Thank you Daniël.


Sorry, I got this error:  ORA-00933: SQL command not properly ended

The image is my query and RowCount value.

I have check the update statement can execute. I got error after add the select statement.

Do you have the property Expand Inline Parameters set to True?

See the screenshot I shared originally.

Daniël Kuhlmann wrote:

Do you have the property Expand Inline Parameters set to True?

See the screenshot I shared originally.

Yes! I've already set to Ture...


Hmm... problem is I don't have Oracle and are not an Oracle specialist.

Either way, the trick is the Inline Parameter and SELECT statement with output parameter and the right Oracle syntax. Hope you can google yourself to a working SQL clause.