| | |
problem with update
Please support our Oracle advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Oct 2007
Posts: 280
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
Oracle Syntax (Toggle Plain Text)
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 8:45 am.
•
•
Join Date: Dec 2006
Posts: 44
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
- Problem with Windows Update and WinXP (Web Browsers)
- Error 624: The system could not update the phone book file (Windows NT / 2000 / XP)
- 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)
- 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
| Thread Tools | Search this Thread |
2009predictions acquisition amazon.com bartz bernanke cia citrix cloudcomputing crm database dell economy enterprise enterprise2.0 enterprisesoftware federalreserve forbes hp ibm intellipedia internet larryellison layoffs linux loughridge mediawiki michaeljackson microsoft neverland nortel notebooks oil operatingsystem oracle palm rimm saas salesforce sap seagate socialcomputing sun sybase technologystocks virtualiron virtualization vmware wiki wikipedia xen yahoo zoho






