Skip to Main Content

SQL & PL/SQL

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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Set time interval for below query to run automatically in every 5 mins

gladyvillaJul 16 2014 — edited Jul 17 2014

Hi,

     Pls refer the below query,from this query set a time interval for to process or run this query automatically in every 5 mins.

Help me...!!!

Declare

l_recid varchar2(100);

Cursor c1 is

Select a.recid from f_ac_event a,f_ac_event@abnprod b where a.recid=b.recid;

Begin

Open c1;

loop

Fetch c1 into l_recid;

Delete from f_ac_event
where recid=l_recid;

Exit when c1%notfound;

End loop;

Close c1;

End;

/

------------------------------------------------------------------------------(or)-----------------------------------------------------------------------------------------------------

delete from f_ac_event
where recid in (select x.recid from f_ac_event@abnprod x);

-----------------------------------------------------------------------------------------------------------------------------------------------------------------

Regards,

villa

This post has been answered by gladyvilla on Jul 17 2014
Jump to Answer

Comments

Processing
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Aug 14 2014
Added on Jul 16 2014
7 comments
1,235 views