cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Rows updated

0 Likes
4,920

I've just noticed that v17 Central doesn't return the number of rows updated after an UPDATE... It gives you a warm fuzzy feeling that you did the right thing when you see 'one row(s) updated' and it's what you intended to do... Is there a hidden checkbox somewhere that restores this feature?

On the same subject if I wanted to add that to one of our utilities (outside of Sybase Central) what method can be used to return the number of rows updated?

Say

  UPDATE Customers SET Customer_Name = 'Smith' WHERE Customer_Name = 'Jones'

and return a integer of 3 if three rows were effected?

Thanks

View Entire Topic

v17 Central doesn't return the number of rows updated after an UPDATE
Look, please, History Tab:
Re Rows updated

VolkerBarth
Contributor
0 Likes

Yep, but that's the DBISQL tool, not SQL Central...

0 Likes

That is actually what I meant - tend to think of Sybase Central as the overall application and Interactive SQL as just another tool within that app... The rows updated information in Results was very useful in prior versions and seeing '0 row(s) updated' is a major red flag that generally means user error.

VolkerBarth
Contributor
0 Likes

@gchq: Sorry, I still don't get the point. - If you relate to Interactive SQL, then where exactly do you notice a "0 row(s) updated" notification when more rows have been updated?

As said, I agree that v17 misses the former "Messages" tab and the display of those messages within the according "History" tab is confusing but the number of rows should be correct, as in Ilia's sample (and my own experience).

0 Likes

It's just a handy reference without opening another tab - 40 row(s) updated - probably good 0 rows(s) updated - probably wrong criteria or wrong table 48,000000 row(s) updated - probably time to restore from the last backup.

Having said that when you run a SELECT in prior versions, then an UPDATE you have to open another tab in any event as the SELECTED rows are still in the results pane

VolkerBarth
Contributor
0 Likes

Well, the old DBISQLC utility (still available with v17, and still heavily used by the SQL Anywhere engineers themselves...) has a separate Statistics pane, and therefore SQL statements, result sets (only one!) and statistics are shown in their respective panes just beneath each other. Good old times:)


I'd love to show an image but unfortunately, my upload attempts are failing today...:(

VolkerBarth
Contributor
0 Likes

FWIW, here's what v16 and v17 DBISQL show when doing a simple UPDATE within the same v17 demo database.

As stated, I do think that it's no improvement that v17 shows the row count within the History tab, but besides that, in my tests both v16 and v17 do show the real number of modified rows...


Re Rows updated

0 Likes

Probably just me clicking the SQL statement and not getting feedback in the results tab that I am used to seeing that's a little unnerving 🙂