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!

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

sarada chellu - oracleMar 21 2011 — edited Mar 21 2011
Hi,

I have the below function it is succesffully exceutes the select command but fails at delete by throwing the error - ORA-14551: cannot perform a DML operation inside a query

create or replace function ap_dml_tbsal_st_00(var_l_session_id in out number,
var_bank_code in varchar2,
var_party_id in varchar2)
return number as
begin

select party_type from abc where party_id = var_party_id;

begin
DELETE FROM xyz WHERE xyz.SESSION_ID = var_l_session_id;
exception
when others then
dbms_output.put_line(SQLERRM);
raise_application_error(-1,
*'failed while deleting TBL_TBSAL_ST_00 ');*
end;

end;

Thanks,
Sarada
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 18 2011
Added on Mar 21 2011
3 comments
4,701 views