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:
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 Daniel,
How many attributes do I set in int structure? Is it just one attribute, where the number of rows impacted are deposited to this attribute?
Thank you,
Prajwal.
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.
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.
Hi Lucas
you could use the return clause with the update statement, have a look here please
https://docs.oracle.com/cd/B28359_01/appdev.111/b28370/returninginto_clause.htm#LNPLS01354
or here
https://docs.oracle.com/cd/B28359_01/server.111/b28286/statements_10008.htm#SQLRF01708