select * from table
(test_pgk.transform_test
(cursor
(
select code,text from test_1 t order by code,rowid
)))
ORA-00942: table or view does not existMore Details: https://docs.oracle.com/error-help/db/ora-00942
create table test_1 (code number, text varchar2(100))
Table created.
select * from table
(test_pgk.transform_test
(cursor
(
select code,text from test_1 t order by code,rowid
)))
ORA-00904: "TEST_PGK"."TRANSFORM_TEST": invalid identifierMore Details: https://docs.oracle.com/error-help/db/ora-00904
create table test_1 (code number, text varchar2(100))
ORA-00955: name is already used by an existing objectMore Details: https://docs.oracle.com/error-help/db/ora-00955
insert into test_1 values (1,'t1')
1 row(s) inserted.
select * from table
(test_pgk.transform_test
(cursor
(
select code,text from test_1 t order by code,rowid
)))
ORA-00904: "TEST_PGK"."TRANSFORM_TEST": invalid identifierMore Details: https://docs.oracle.com/error-help/db/ora-00904
insert into test_1 values (2,'t2')
1 row(s) inserted.
insert into test_1 values (3,'t3')
1 row(s) inserted.
create or replace package test_pgk
as
type txn_test_r is record
(
code test_1.code%type,
text test_1.text%type);
type txn_test_t is table of txn_test_r;
type txn_test_rc is ref cursor return txn_test_r;
function transform_test
(p_refcur in txn_test_rc
)
return txn_test_t
pipelined
parallel_enable(partition p_refcur by any);
end test_pgk;
Package created.
create or replace PACKAGE body test_pgk
AS
FUNCTION transform_test(
p_refcur IN txn_test_rc )
RETURN txn_test_t pipelined parallel_enable(
partition p_refcur BY ANY)
AS
l_txn_test_t txn_test_t := txn_test_t();
BEGIN
LOOP
FETCH p_refcur bulk collect INTO l_txn_test_t limit 500;
EXIT
WHEN l_txn_test_t IS NULL OR l_txn_test_t.count = 0;
FOR i_index IN 1..l_txn_test_t.count
LOOP
dbms_output.put_line('Inside loop');
pipe row (l_txn_test_t(i_index));
END LOOP;
END LOOP;
RETURN;
END transform_test;
END test_pgk;
Package Body created.
select * from table
(test_pgk.transform_test
(cursor
(
select code,text from test_1 t order by code,rowid
)))
ORA-03001: unimplemented featureMore Details: https://docs.oracle.com/error-help/db/ora-03001
create table test_1 (code number, text varchar2(100))
ORA-00955: name is already used by an existing objectMore Details: https://docs.oracle.com/error-help/db/ora-00955
insert into test_1 values (1,'t1')
1 row(s) inserted.
insert into test_1 values (2,'t2')
1 row(s) inserted.
insert into test_1 values (3,'t3')
1 row(s) inserted.
create or replace package test_pgk
as
type txn_test_r is record
(
code test_1.code%type,
text test_1.text%type);
type txn_test_t is table of txn_test_r;
type txn_test_rc is ref cursor return txn_test_r;
function transform_test
(p_refcur in txn_test_rc
)
return txn_test_t
pipelined
parallel_enable(partition p_refcur by any);
end test_pgk;
create or replace PACKAGE body test_pgk
AS
FUNCTION transform_test(
p_refcur IN txn_test_rc )
RETURN txn_test_t pipelined parallel_enable(
partition p_refcur BY ANY)
AS
l_txn_test_t txn_test_t := txn_test_t();
BEGIN
LOOP
FETCH p_refcur bulk collect INTO l_txn_test_t limit 500;
EXIT
WHEN l_txn_test_t IS NULL OR l_txn_test_t.count = 0;
FOR i_index IN 1..l_txn_test_t.count
LOOP
dbms_output.put_line('Inside loop');
pipe row (l_txn_test_t(i_index));
END LOOP;
END LOOP;
RETURN;
END transform_test;
END test_pgk;
select * from table
(test_pgk.transform_test
(cursor
(
select code,text from test_1 t order by code
)));
Errors: PACKAGE TEST_PGK Line/Col: 19/1 PLS-00103: Encountered the symbol "CREATE"More Details: https://docs.oracle.com/error-help/db/ora-24344
select * from table
(test_pgk.transform_test
(cursor
(
select code,text from test_1 t order by code
)))
ORA-06575: Package or function TEST_PGK is in an invalid stateMore Details: https://docs.oracle.com/error-help/db/ora-06575
create or replace package test_pgk
as
type txn_test_r is record
(
code test_1.code%type,
text test_1.text%type);
type txn_test_t is table of txn_test_r;
type txn_test_rc is ref cursor return txn_test_r;
function transform_test
(p_refcur in txn_test_rc
)
return txn_test_t
pipelined
parallel_enable(partition p_refcur by any);
end test_pgk;
Package created.
create or replace PACKAGE body test_pgk
AS
FUNCTION transform_test(
p_refcur IN txn_test_rc )
RETURN txn_test_t pipelined parallel_enable(
partition p_refcur BY ANY)
AS
l_txn_test_t txn_test_t := txn_test_t();
BEGIN
LOOP
FETCH p_refcur bulk collect INTO l_txn_test_t limit 500;
EXIT
WHEN l_txn_test_t IS NULL OR l_txn_test_t.count = 0;
FOR i_index IN 1..l_txn_test_t.count
LOOP
dbms_output.put_line('Inside loop');
pipe row (l_txn_test_t(i_index));
END LOOP;
END LOOP;
RETURN;
END transform_test;
END test_pgk;
Package Body created.
select * from table
(test_pgk.transform_test
(cursor
(
select code,text from test_1 t order by code
)))
CODE | TEXT | 1 | t1 | 1 | t1 | 2 | t2 | 2 | t2 | 3 | t3 | 3 | t3 |
---|
select * from table
(test_pgk.transform_test
(cursor
(
select code,text from test_1 t order by code,rowid
)))
ORA-03001: unimplemented featureMore Details: https://docs.oracle.com/error-help/db/ora-03001