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 2000 Forums
 Transact-SQL (2000)
 Query to display father item,sub item...

Author  Topic 

tony_cambodia
Starting Member

1 Post

Posted - 2012-08-28 : 01:51:16
Hi all experts,
I have 3 father item and each father item has alot of sub items.
ex:Items "A,B,C" are Father Item.
A
A1
A1.1
A1.1.1
A1.1.2
A1.1.3
A1.2
A1.2.1
A1.2.2
A2
A3
A4
B
B1
B1.1
B1.1.1
B1.1.2
B1.1.3
B1.1.3.1
B1.1.3.2
B1.2
B1.2.1
B2
B2.1
B2.2
........
What query should i got the result like this?
Note:
the sub item can be the father item

Thanks
TONY

nigelrivett
Master Smack Fu Yak Hacker

3385 Posts

Posted - 2012-08-28 : 04:29:05
What does your data look like?
I'm guessing you have links in a hierarchy - is it a single table or a conjoint table?

Are you really v2000 - it makes a lot of difference to the solution.

==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -