Tree View Query [message #493236] |
Mon, 07 February 2011 00:36 |
|
isohail
Messages: 7 Registered: February 2011 Location: Pakistan
|
Junior Member |
|
|
I have the following Three Tables Can anyone tell me how to write a query for hirachical tree for these three tables
Create table HAccounts(
HCode varchar2(2),
Detail varchar2(50),
constraint pk_HCode primary key (HCode))
/
Create Table GAccounts(
HCode varchar2(2),
Gcode varchar2(2),
HGcode varchar2(4),
Detail varchar2(50),
constraint pk_HGCode primary key (HGcode),
CONSTRAINT fk_HCode FOREIGN KEY (HCode) REFERENCES HAccounts(HCode))
/
Create table FAccounts(
HGcode varchar2(4),
FCode varchar2(4),
HGFCode varchar2(,
Detail varchar2(50),
ODEBIT NUMBER(12,2),
OCREDIT NUMBER(12,2),
Constraint pk_HGFCode primary key (HGFcode),
CONSTRAINT fk_HGCode FOREIGN KEY (HGcode) REFERENCES GAccounts(HGcode))
/
Thanks in advance
[Updated on: Mon, 07 February 2011 00:38] Report message to a moderator
|
|
|