Posts Topics Forums Images
Search videos from message boards Videos Search messages from microblogs Microblogs Search messages from imdb.com Imdb Search messages from yuku.com Yuku Search messages from lefora.com (free forums) Lefora
My account: Login | Sign Up
Loading... 

Thread: Requete hierarchique - SGBD/SQL - Programmation - FORUM HardWare.fr

Started 1 month, 2 weeks ago by Anteus
Bonjour, J'ai la requete suivante sur une base Oracle 9i: SELECT ID, SUBSTR(SYS_CONNECT_BY_PATH(ID, '/' ), 2,6) FROM TABLE CONNECT BY PRIOR ID=PARENT START WITH ID IN ( SELECT ID FROM TABLE WHERE ID LIKE '1234%') La table requetee a une colonne "TYPE". Je voudrais afficher le TYPE du parent racine que je recupere via SUBSTR(SYS_CONNECT_BY_PATH(ID, '/' ), 2,6) Je me ...
Site: FORUM HardWare.fr  FORUM HardWare.fr - site profile
Forum: SGBD/SQL  SGBD/SQL - forum profile
Total authors: 2 authors
Total thread posts: 5 posts
Thread activity: no new posts during last week
Domain info for: hardware.fr

Other posts in this thread:

skeye replied 1 month, 2 weeks ago
euh, rajouter TYPE dans les colonnes demandée?

Anteus replied 1 month, 2 weeks ago
skeye a écrit : euh, rajouter TYPE dans les colonnes demandée? le TYPE du parent racine Si je rajoute juste la colonne, j'aurai le type des enfants, ce que je ne veux pas. Ou du moins, je sais comment le choper

Anteus replied 1 month, 2 weeks ago
Ah ben j'ai trouve, en fait SELECT ID, SUBSTR(SYS_CONNECT_BY_PATH(ID, '/' ), 2,6), SUBSTR(SYS_CONNECT_BY_PATH(TYPE, '/' ), 2,1) FROM TABLE CONNECT BY PRIOR ID=PARENT START WITH ID IN ( SELECT ID FROM TABLE WHERE ID LIKE '1234%') C'etait effectivement tout con

Anteus replied 1 month, 2 weeks ago
Merci skeye pour le passage

 

Top contributing authors

Name
Posts
Anteus
4
user's latest post:
Requete hierarchique - SGBD/SQL...
Published (2009-11-06 19:47:00)
Merci skeye pour le passage
skeye
1
user's latest post:
Requete hierarchique - SGBD/SQL...
Published (2009-11-06 19:37:00)
euh, rajouter TYPE dans les colonnes demandée?

Related threads on "FORUM HardWare.fr":

Related threads on other sites:

Thread profile page for "Requete hierarchique - SGBD/SQL - Programmation - FORUM HardWare.fr" on http://www.hardware.fr. This report page is a snippet summary view from a single thread "Requete hierarchique - SGBD/SQL - Programmation - FORUM HardWare.fr", located on the Message Board at http://www.hardware.fr. This thread profile page shows the thread statistics for: Total Authors, Total Thread Posts, and Thread Activity