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
  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_name%type;
              htree := Find_Item('BLOCK_TREE.HTREE');
              open cur_tree_query;
               fetch cur_tree_query into ename;
               exit when cur_tree_query%notfound;
         end loop;
         close cur_tree_query;
         END ;

but this cursor is giving me error...invalid query for hierarchical tree.
Who is Participating?
Helena Markováprogrammer-analystCommented:
You cannot use ADD_TREE_DATA, because parameter "data" can be:
Specifies the data to be added. If data source is QUERY_TEXT, then data is the text of the query. If data source is RECORD_GROUP, then data is an item of type RECORDGROUP or the name of a record group.

You can use ADD_TREE_NODE in your procedure.

If you have access to MetaLink you can read Note:210663.1 - "FTREE documentation".
Helena Markováprogrammer-analystCommented:
I see that this procedure is used in Forms.
There is no "ename" there.
Helena Markováprogrammer-analystCommented:
Oh sorry, now I see "ename".
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.