Hashmap
674955Aug 14 2009 — edited Aug 14 2009Hi 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!!!