Home » Developer & Programmer » Forms » Hierarchical Query for Employee (Developer 6I Database 10g window XP)
Hierarchical Query for Employee [message #410771] Tue, 30 June 2009 03:30 Go to next message
shahzaib_4vip@hotmail.com
Messages: 410
Registered: December 2008
Location: karachi
Senior Member
Hi i have 1 Table Employee

In employee i have code's which is

01 is Department Code
and 010001 is Employee Code

I need a Hierarchical Tree view like this
01
010001
010002
010003
02
020001
020002
020003
03
030001
030002

Any idea

Regards

Shahzaib Ismail
Re: Hierarchical Query for Employee [message #411158 is a reply to message #410771] Thu, 02 July 2009 03:26 Go to previous messageGo to next message
shahzaib_4vip@hotmail.com
Messages: 410
Registered: December 2008
Location: karachi
Senior Member
oK DONE IT
Re: Hierarchical Query for Employee [message #411258 is a reply to message #411158] Thu, 02 July 2009 19:41 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
As a guide to others, please post your solution.

David
Re: Hierarchical Query for Employee [message #411360 is a reply to message #410771] Fri, 03 July 2009 04:25 Go to previous message
shahzaib_4vip@hotmail.com
Messages: 410
Registered: December 2008
Location: karachi
Senior Member
I Alter my employee table and create one column
Catagory_id Then Right This code

And in ID i write the trigger when_validate_item

IF :ID <99 THEN 

	
	SET_ITEM_PROPERTY('CONTROL',ENABLED,PROPERTY_FALSE);

Elsif :Id >99 Then 	


:Block2.catagory_no := substr(:block2.Id,1,2);

END IF;






SELECT 1, LEVEL, name||' ('||to_char(id)||' )','',to_char(id) 
FROM py_emp 
CONNECT BY PRIOR id = catagory_id start with
id BETWEEN 01 AND 100



Regards

Shahzaib ismail
Previous Topic: Schedule the form execution
Next Topic: Populating LOV with Like operator
Goto Forum:
  


Current Time: Fri Sep 20 08:18:28 CDT 2024