Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Creating Heirarchy within same table

Author  Topic 

de4ever@gmail.com
Starting Member

36 Posts

Posted - 2010-07-28 : 02:31:49
I Have a Content table

ID DocumentNo Name IsRevised IsApproved
1 D-001 Doc1 False False
2 D-002 Doc2 False False
3 D-003 Doc3 False False
4 D-001 Doc1 True False
5 D-002 Doc2 True False
6 D-003 Doc3 True False
7 D-001 Doc1 False True
8 D-002 Doc2 False True
9 D-003 Doc3 False True

and a PubTable with

ID DocumentID Name

I want to display this data in heirarchy using id,parentid

so that can be represented as

DocumentName-->
General
PubName
Revised
PubName
Approved
PubName

Please help me out









de4ever@gmail.com
Starting Member

36 Posts

Posted - 2010-07-28 : 02:34:02
Hierarchy is
DocumentName-->
General
-->PubName
Revised
-->PubName
Approved
-->PubName
DocumentName-->
General
-->PubName
Revised
-->PubName
Approved
-->PubName

Go to Top of Page
   

- Advertisement -