Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple updates Oracle 8.1.5

Status
Not open for further replies.

loschiavoj

Programmer
Dec 28, 2000
23
0
0
US
I am trying to run a multiple update statement;
update (table) set (column_name) = (Value) where row = (id)
update (table) set (column_name) = (Value) where row = (id)
When I run this through SQL PLus as a combined statement I receive a n error "missing expresion". However if I run them induvidually they update the rows correctly. Keep in mind my statement contains 60 update statements.

Thanks,
 
And they have to be run as 60 update statements. You cannot concatenate statements like this. They have to remain individual commands.
 
As a possible alternative, you might want to consider a procedure that will the updates for you. Perhaps it could use utl_file to read the values from a file and then do the updates.
Please look at the Posting titled
"Updateing Table Info from Delimited File"
for one possible solution to your problem.
 
Or you could create a file with all 60 update statements, separated by semicolons. Then in SQL*Plus execute the contents of the file with the command @filename. That's a very common way to run a multiple statement script in Oracle.
 
Thanks Karluk. It worked and saved me alot of time.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top