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!

Check id in localdb if already exist in remote db delete that record from local db - but i have an e

gladyvillaJul 16 2014 — edited Jul 16 2014

Create or replace procedure p1 ()

As

Declare

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 recid

If c1%found then

Delete from f_ac_event where recid=?;

Dbms_output.put_line(recid  || ‘deleted’)

Exit when c1%notfound;

End if;

End loop;

Close c1;

End;

/

This post has been answered by KarK on Jul 16 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 13 2014
Added on Jul 16 2014
9 comments
2,077 views