You are here: Re: tree structure select problem « MsSQL Server « IT news, forums, messages
Re: tree structure select problem

Posted by Erland Sommarskog on 11/07/05 01:24

ven (venome_@poczta.onet.pl) writes:
> hello i have a table with four fields : name_id, name, tree_id, level with
> these data:
>
> 1 name1 001 1
> 2 name2 002 1
> 3 name3 003 1
> 4 name4 001001 2
> 5 name5 001002 2
> 6 name6 001003 2
> 7 name7 001001001 3
>
> tree:
>
> 1-
> - 4
> -7
> -5
> -6
> 2-
> 3-
>
> and procedure which add nodes to tree looks
> tree.add(idparent,idchild,name)
>
> how to write select which returns idparent,idchild and name

Since I answered a similar query earlier this week, I'm lazy and refer
you to that thread:
http://groups.google.com/group/comp.databases.ms-sqlserver/browse_thread/thread/dd4678c820576424/d99fcc60b9ca2ed1?lnk=st&q=group:comp.databases.ms-sqlserver+insubject:Rendering+insubject:directory+insubject:structures&rnum=1&hl=sv#d99fcc60b9ca2ed1



--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация