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!

Hashmap

674955Aug 14 2009 — edited Aug 14 2009
Hi there,

I wanted to implement something similar to Hashmap in Java like a Key Value pair. And the Value should be of ANYDATA type so I can pass any value from my frontend.

create or replace procedure test(p_name varchar2,p_value varchar2)
is
v_name dbms_utility.lname_array;
v_count number;
v_value dbms_utility.anydata_array;
begin
DBMS_UTILITY.comma_to_table(p_name,v_count,v_name);
DBMS_UTILITY.comma_to_table(p_value,v_count,v_value);

for i in 1..v_count
loop
DBMS_OUTPUT.PUT_LINE('Name : ' || v_name(i) || ' Value :'|| v_value(i));
end loop;
end test;

This is what I thought, but this will not work buz the comma_to_table doesn't accept anydata_array. Please let me know if you have any other better way of implementing my idea.

Looking forward for your suggestions, Thanks in Advance!!!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 11 2009
Added on Aug 14 2009
16 comments
4,070 views