|
|
|
|
|
|
|
|
| Re: Updating Accounts and Displaying Changes [message #563428 is a reply to message #563422] |
Mon, 13 August 2012 14:20  |
 |
Littlefoot
Messages: 16928 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Jes, you wrote a procedure and now what? Does it do what you wanted it to? I suppose not (otherwise, you won't post a question here). The procedure, when executed, displays a single "message" (DBMS_OUTPUT.PUT_LINE). If you wanted to update multiple records at once, check whether UPDATE statement's WHERE clause can be set in order to make that possible. Generally speaking, you should do in SQL everything you can and switch to PL/SQL only if you have to.
Because, if you wanted to update multiple records - one by one - you'd have to use a loop. Some people call it "row by row, slow by slow" as it *would* be slower than pure SQL (most probably you wouldn't even notice the difference for tens or hundreds of updates, but it might be significant when many records are involved). But, it would make it possible to display a message for every record you update.
As you were already told, a test case would make it simpler for people who would like to assist. It is kind of difficult to imagine what you have and what you'd want to have at the end.
|
|
|
|