This is for SQL Server. 

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf
Of Dennis
Sent: Tuesday, August 16, 2005 8:07 PM
To: [email protected]
Subject: Re: [vbhelp] Parent Children selection


is it for oracle or sqlserver?

if oracle youre in luck, they have the "connect by prior" keyword that
can output this result in one sql statement. for sql server, you might
need execute a series of dynamic sql inside a stored procedure.

--- Charles Parks <[EMAIL PROTECTED]> wrote:

> What would be the select statement for choosing the children that 
> belong to a parent when a child can have children?
> 
> Sample table data
> 
> Parent  | Child               |...
> ------------------
> Books  |Awards        |
> Awards|5Year          |
> Awards|Admin          |
> Awards|25Year |
> 5Year |Pictures       |
> 5Year |Worksheet      |
> Admin |Pins           |
> Admin |Floor Plans    |
> ...
> 
> The desired select statement should then return something like 
> Books\Awards\5Year\Pictures Books\Awards\5Year\WorkSheet 
> Books\Awards\Admin\Pins Books\Awards\Admin\Floor Plans
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com 






'// =======================================================
    Rules : http://ReliableAnswers.com/List/Rules.asp
    Home  : http://groups.yahoo.com/group/vbHelp/
    =======================================================
    Post  : [email protected]
    Join  : [EMAIL PROTECTED]
    Leave : [EMAIL PROTECTED]
'// =======================================================
 
Yahoo! Groups Links



 





------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a 
href="http://us.ard.yahoo.com/SIG=12hbq9den/M=362329.6886308.7839368.1510227/D=groups/S=1705115364:TM/Y=YAHOO/EXP=1124288485/A=2894321/R=0/SIG=11dvsfulr/*http://youthnoise.com/page.php?page_id=1992
">Fair play? Video games influencing politics. Click and talk back!</a>.</font>
--------------------------------------------------------------------~-> 


'// =======================================================
    Rules : http://ReliableAnswers.com/List/Rules.asp
    Home  : http://groups.yahoo.com/group/vbHelp/
    =======================================================
    Post  : [email protected]
    Join  : [EMAIL PROTECTED]
    Leave : [EMAIL PROTECTED]
'// =======================================================
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/vbhelp/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to