claghorn
asked on
Oracle Table Type Needs Multiple Rows
I have a type and a table of that type
type INV_TABLE is the table
type INV_TYPE is the type
Why cant I insert multiple rows into the table.
It only ever outputs one row with select * from table(GET_INVENTORY(97));
type INV_TABLE is the table
type INV_TYPE is the type
Why cant I insert multiple rows into the table.
It only ever outputs one row with select * from table(GET_INVENTORY(97));
create or replace
function get_inventory(in_var in number) return INV_TABLE is
test_recs INV_TABLE;
begin
SELECT INV_TYPE( 1, 'A', 2, 'B' )
BULK COLLECT
INTO test_recs
FROM dual;
--only this is seen with test:
SELECT INV_TYPE( 1, 'A', 2, 'C' )
BULK COLLECT
INTO test_recs
FROM dual;
-- insert into test_recs values( 1, 'A', 2, 'B' ); --does not work. why?
RETURN test_recs;
end;
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER