Adding data to a Hierarchical tree

Posted on 2007-10-01
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
    LVL 22

    Expert Comment

    I see that this procedure is used in Forms.
    There is no "ename" there.
    LVL 22

    Expert Comment

    Oh sorry, now I see "ename".
    LVL 22

    Accepted Solution

    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".

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
    Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
    Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
    This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

    737 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

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now