Adding data to a Hierarchical tree

Posted on 2007-10-01
Medium Priority
Last Modified: 2013-12-19
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.
Question by:fyzalkabu
  • 3
LVL 22

Expert Comment

by:Helena Marková
ID: 19989738
I see that this procedure is used in Forms.
There is no "ename" there.
LVL 22

Expert Comment

by:Helena Marková
ID: 19989751
Oh sorry, now I see "ename".
LVL 22

Accepted Solution

Helena Marková earned 2000 total points
ID: 19989778
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".

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.
Suggested Courses
Course of the Month17 days, 8 hours left to enroll

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question