I have a pipelined table function that work fine.
what I need now is to perform an update query inside this function:
create or replace FUNCTION test(A varchar2 )
RETURN type_As PIPELINED as row_type type_A;
Begin
....
update X set A=0 where B=1;
select type_A(...)
into row_type
from dual;
PIPE ROW(row_type);
return ;
end;
When I run this query :
SELECT * from TABLE(test('123'))
I get this error:
ORA-14551:cannot perform a DML operation inside a query
So it's clear that a cannot add the update query here , so how to perform the update instead ?
Any help is appreciated.