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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

scheduling an update query , how

Status
Not open for further replies.

blom0344

Technical User
Mar 20, 2002
3,441
0
0
NL
Due to a bug in application I have to manually update records with an empty status field to value '00'. Very simple SQL, very fast, no problem. I want a way to either schedule this statement or find a way to fill in default '00' values for newly created records.....
Any ideas.... T. Blom
Information analyst
tbl@shimano-eu.com
 
You may:

define default value for a field
or
write a trigger
or
do it in a batch mode from dbms_job
 
Hello Sem,

The situation is a bit more complicated , cause the application runs on a database which we bought as a complete package. Rebuilding tables or other DBA type of actions is not something we can just do if we please, in order to keep support from Vendor. Is there a way to schedule something using the GUI tools of the administration client (Enterprise Manager and such ...)? T. Blom
Information analyst
tbl@shimano-eu.com
 
Using DBMS_JOB does not require administration actions (besides setting job_queue_processes and job_queue_interval) or rebuilding tables. It's just embdedded Oracle scheduler. Apparantly, you may use some kind of external scheduler, like cron or at, but for your specific purpose DBMS_JOBS looks like a better solution.
 
DBMS_JOB will be a better solution for this problem. Using cron or at for updating one simple column is not necessary. Is it possible for you to give alter table command, then using that you can set the default automatically which will be the best solution for your case. Thanks & Regards,
DoubleH
 
DoubleH: default value may help, if mandatory value is missed, it will not change NULL value inserted.
 
Sem & DoubleH,

I came up with DoubleH' idea of default value yesterday and proposed it to the Vendor. He agreed, so I issued the alter table command. Seems to work properly.......... T. Blom
Information analyst
tbl@shimano-eu.com
 
Hi,
As Sem had mentioned, also issue update on the column where column value is null.
Thanks & Regards,
DoubleH
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top