Skip to Main Content

Oracle Database Discussions

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!

ORA-14551:cannot perform a DML operation inside a query

Tamim KhanApr 6 2007 — edited Apr 7 2007
hi I am Create a Function FUN_DNS_ALERT
Which Perform a insert operation in Nested Cursor loop...
But ORA-14551:cannot perform a DML operation inside a query Error Occur When I Call The Function.
How Can I Solve this Problem...
Regards..
Tamim
SQL> Create table test1234 (mnumber number(20));
Table created.
SQL> Create table DNS_SUBSCRIPTION (mnumber number(20));
Table created.

SQL> create or replace
2 FUNCTION FUN_DNS_ALERT
3 return number
4 as
5 cursor cr_dns_subscription is Select Mobileno from DNS_SUBSCRIPTION;
6 BEGIN
7 for record_dns_subscription in cr_dns_subscription loop
8 INSERT INTO test1234(mnumber) VALUES(record_dns_subscription.Mobileno);
9 end loop;
10 RETURN (1) ;
11 END;
12 /

Function created.

SQL> select FUN_DNS_ALERT from dual;
select FUN_DNS_ALERT from dual
*
ERROR at line 1:
ORA-14551: cannot perform a DML operation inside a query
ORA-06512: at "SYSTEM.FUN_DNS_ALERT", line 7
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 5 2007
Added on Apr 6 2007
3 comments
1,081 views