I had a similar problem. Instead of insert select; try using for c1 in ( ) loop insert .... end loop; Regards Joseph Onkar N Tiwary <onkarnath.tiwary@xxxxxxxxx> wrote: Hi, I have one query , when I am running this query against the remote database, its working fine but when I am putting this in pl/sql block its giving the following error: *******************************************************************************************