Creating batch job to run an "Update" statement nightly
525868Oct 10 2012 — edited Oct 10 2012Hello,
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?