Number of updated rows is different than it should be when using DECLARE statement #185
-
Hello, I have the following statement which returns wrong number of updated rows when using python (somethimes it returns 0 updated rows, sometimes a random number) but in fact it acts OK and i checked in db all rows are updated as expected:
If i use this function to perform update, cursor.rowcount returns wrong number of updated rows:
Is there a way to get exact number of updated rows when for this case? BR, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
I'm not sure what you think the "right" number of rows ought to be, but the definition according to the documentation is that the value should be |
Beta Was this translation helpful? Give feedback.
-
Hello @anthony-tuininga , @cjbj , Sorry for my late response. Somehow i omitted the fact Anthony pointed out.
and added this part (from the docs) to my code and got what i needed.
Thank you both! You poinetd me into right direction. BR, |
Beta Was this translation helpful? Give feedback.
I'm not sure what you think the "right" number of rows ought to be, but the definition according to the documentation is that the value should be
1
for all PL/SQL blocks executed by a call tocursor.execute()
-- so likely not what you would like to see. If you want the number of rows updated in your table you will need to use an OUT variable to your PL/SQL block.