fyzalkabu
asked on
Adding data to a Hierarchical tree
i am having a tree with nodes as A-Z. i need to add data to these nodes from another table such that node A is having data as.. names of all the employees starting with alphabet 'A'..etc
i am using a procedure to retreive the data.
PROCEDURE proc_add_tree_data(str char) IS
BEGIN
declare
htree ITEM;
CURSOR cur_tree_query IS
select distinct emp_first_name
from emp_info_hdr
where emp_first_name like str||'%';
ename emp_info_hdr.emp_first_nam e%type;
begin
htree := Find_Item('BLOCK_TREE.HTRE E');
open cur_tree_query;
LOOP
fetch cur_tree_query into ename;
Ftree.Add_Tree_Data(htree,
Ftree.ROOT_NODE,
Ftree.PARENT_OFFSET,
Ftree.LAST_CHILD,
Ftree.QUERY_TEXT,
ename);
exit when cur_tree_query%notfound;
end loop;
close cur_tree_query;
END ;
END;
but this cursor is giving me error...invalid query for hierarchical tree.
i am using a procedure to retreive the data.
PROCEDURE proc_add_tree_data(str char) IS
BEGIN
declare
htree ITEM;
CURSOR cur_tree_query IS
select distinct emp_first_name
from emp_info_hdr
where emp_first_name like str||'%';
ename emp_info_hdr.emp_first_nam
begin
htree := Find_Item('BLOCK_TREE.HTRE
open cur_tree_query;
LOOP
fetch cur_tree_query into ename;
Ftree.Add_Tree_Data(htree,
Ftree.ROOT_NODE,
Ftree.PARENT_OFFSET,
Ftree.LAST_CHILD,
Ftree.QUERY_TEXT,
ename);
exit when cur_tree_query%notfound;
end loop;
close cur_tree_query;
END ;
END;
but this cursor is giving me error...invalid query for hierarchical tree.
Oh sorry, now I see "ename".
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
There is no "ename" there.