Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Creating batch job to run an "Update" statement nightly

525868Oct 10 2012 — edited Oct 10 2012
Hello,

I"m trying to execute a simple script which runs nightly to update records in a table if where conditions are met.

For example,
update customer set field_a = '1' where field_a <> field_b

I created a text file a.bat to handle the log-on and the sql call as shown below and it works fine.
---> sqlplus username/password@dbname @c:\sql\batch\update_field_a.sql

And the udpate_field_a.sql file contains the example statement from above.
---> update customer set field_a = '1' where field_a <> field_b

I'm on Oracle 10g and the script hangs....if I use "select" statement instead of "update", the job completes fine.

Any advises?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 7 2012
Added on Oct 10 2012
2 comments
421 views