problem with update
Please support our Oracle advertiser: Programming Forums
![]() |
•
•
Posts: 275
Reputation:
Solved Threads: 19
I have written my simple query using update and in a file with a .sql extension. However, I cant seem to update my table and yet at the end of the input it shows me 1 row updated I would also want to know how I can do 2 updates simultaneously. Thanks. Here is the code
accept ID prompt 'Enter Old ID:' accept ID prompt 'Enter New ID:' accept Name prompt 'Name:' UPDATE table_one set ID=replace(ID,'&ID','&ID') where Name='&Name';
Last edited by joshmo : Nov 16th, 2008 at 7:45 am.
•
•
Posts: 42
Reputation:
Solved Threads: 1
Hi
Your script should update the record assuming the ID and name exist. Try a commit after the update to save the change.
UPDATE table_one
set ID=replace(ID,'&ID','&ID')
where Name='&Name';
commit;
select * from table_one; -- will show your change
Don't perform the update in one sqlplus window and try and view the results in another as the results won't show until you've issued a commit statement.
Hope it helps.
Merry Christmas
Alistair
Your script should update the record assuming the ID and name exist. Try a commit after the update to save the change.
UPDATE table_one
set ID=replace(ID,'&ID','&ID')
where Name='&Name';
commit;
select * from table_one; -- will show your change
Don't perform the update in one sqlplus window and try and view the results in another as the results won't show until you've issued a commit statement.
Hope it helps.
Merry Christmas
Alistair
![]() |
Similar Threads
Other Threads in the Oracle Forum
- Problem with Windows Update and WinXP (Web Browsers)
- Error 624: The system could not update the phone book file (Windows NT / 2000 / XP / 2003)
- help!! update mysql problem (MySQL)
- Not able to change/update password (PHP)
- Page Cannot Be Displayed Problem PLEASE HELP (Troubleshooting Dead Machines)
- mid problem in access 2003 (Windows NT / 2000 / XP / 2003)
- Problem using the UPDATE command in VBA (Visual Basic 4 / 5 / 6)
- How to sort the rows in the datagrid and update it successfully? (VB.NET)
Other Threads in the Oracle Forum
- Previous Thread: Limit days stored in DB
- Next Thread: update a record on load
•
•
•
•
Views: 1367 | Replies: 4 | Currently Viewing: 1 (0 members and 1 guests)






Linear Mode