Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Heirarchical Query
Message
De
18/09/2007 07:16:56
Prashant Dongare
Micropro Software Solutions
Nagpur, Inde
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2000
Divers
Thread ID:
01255005
Message ID:
01255062
Vues:
16
Thanks a lot.
You saved my time. Now I'll restructure the database to get the desired result.
Thank you once again for your valuable time and advice.
Regards
Prashant
>MS SQL Server 2000 does not support hierarchical queries. The hierarchical queries support has been added in MS SQL Server 2005
>
>>Please can anyone suggest me a counter query in MS SQL for the one in Oracle.
>>
>>In Oracle I use the following Query to traverse the data from root to the last child.
>>
>>
>>SELECT LPAD(' ',3*LVLCODE) || Name,
>>         LVLCODE, PRCODE
>> FROM   LEVELMST
>> CONNECT BY PRIOR LVLCODE = PRCODE
>> START WITH PRCODE = 0
>>
>>
>>To traverse from child to root the query in Oracle is
>>
>>
>>SELECT LPAD(' ',3*LVLCODE) || Name,
>>         LVLCODE, PRCODE
>> FROM   LEVELMST
>> CONNECT BY LVLCODE = PRIOR PRCODE
>> START WITH LVLCODE = 17
>>
>>
>>Please help me with these queries.
>>Thanks in advance.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform