|
Re: executing the code only one time every day [message #632789 is a reply to message #632787] |
Thu, 05 February 2015 13:05 |
joy_division
Messages: 4963 Registered: February 2005 Location: East Coast USA
|
Senior Member |
|
|
here's just one way, but it doesn't seem like a good idea, doesn't work well in a multi-user environment, plus do you want it to run once per user or once for the entire day?
put an identifier in a table when it executes, then you check to see if it has been set each time.
|
|
|
|
|
|
|
|
Re: executing the code only one time every day [message #632969 is a reply to message #632787] |
Mon, 09 February 2015 04:22 |
|
jgjeetu
Messages: 373 Registered: July 2013 Location: www.Orafaq.com/Forum
|
Senior Member |
|
|
one suggestion , not sure it will work well or not.
you can make a table like:-
create table abc
(sno number,
code_exe_date date default sysdate)
now you can make a procedure before executing a query it should check that today's date is existing in abc table or not, IF not then it should execute the query and insert max(sno)+1 into abc table in "sno" column. (date will get inserted automatically).
and what should be the ELSE part you know very well.
I think this logic may help.
[Updated on: Mon, 09 February 2015 04:23] Report message to a moderator
|
|
|