Makasih atas bantuannya pak Rudi

--- On Tue, 15/9/09, rudi kristanto <[email protected]> wrote:


From: rudi kristanto <[email protected]>
Subject: Re: [indo-oracle] Minta bantuan Query Level
To: [email protected]
Date: Tuesday, 15 September, 2009, 9:34 PM


  



select jaringan, max(tingkat) jumlah
from (select connect_by_root idjar jaringan, level-1 tingkat
from my_table
start with konek_ke is null
connect by prior idjar = konek_ke
)
group by jaringan
order by jaringan

--
Regards,
Rudi Kristanto.

____________ _________ _________ __
From: musisi musisi <tc2681_2006@ yahoo.com. sg>
To: Indo oracle <indo-oracle@ yahoogroups. com>; OCS <oracle-coretech- 
surabaya@ yahoogroups. com>
Sent: Tuesday, September 15, 2009 9:26:34
Subject: [indo-oracle] Minta bantuan Query Level

Rekans,

saya minta tolong masalah query, saya punya table my_table dengan field dan 
data sbb:

idjar || konek_ke
------------ --------- --
a1 || 
a2 || 
a3 || 
b1 || a1
b2 || a2
c1 || b1
d1 || c1
e1 || d1

saya sudah dapat menampilkan posisi tree sbb :

a1
---> b1
-------> c1
-----------> d1
------------ -> e1
a2
----> b2
a3

dengan query sbb:

select lpad ( ' ',4*(level+1) ) || idjar as idjar
from my_table
start with konek_ke is null
connect by prior idjar=konek_ ke

yang ingin saya tanyakan, query untuk menampilkan data sbb :

idjar || jumlah_jar
------------ --------- ---
a1 || 4
a2 || 1
a3 || 0

tolong pencerahannya.

Thx

Get your new Email address!
Grab the Email name you&#39;ve always wanted before someone else does!
http://mail. promotions. yahoo.com/ newdomains/ sg/

[Non-text portions of this message have been removed]

Get your new Email address!
Grab the Email name you&#39;ve always wanted before someone else does!
http://mail. promotions. yahoo.com/ newdomains/ aa/

[Non-text portions of this message have been removed]

















      

[Non-text portions of this message have been removed]

Kirim email ke