Re: A tree of location and site names..
- From: Hugo Kornelis <hugo@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 18 May 2005 11:11:30 +0200
On Fri, 13 May 2005 08:22:02 -0700, Rhonda Fischer wrote:
>Hello,
>
>This is a tuff one not sure if it can be done with an SQL query, I'm
>thinking along the lines of an inner join, but I'm not really sure.
(snip)
Hi Rhonda,
Sorry for the late reply.
I'm not sure what exactly you're asking. Your message doesn't appear to
have any specific question. Are you looking for generic advice if your
solution is the best one for your problem? Or do you actually need a
query to do a specific job?
In the latter case, please repost. I'd appreciate it if you'd post the
table structure as a CREATE TABLE statement (including all constraints
and properties - any irrelevant columns may be left out, though) and the
sample data as INSERT statements. Also, post the output you'd like to
get from the sameple data.
Check www.aspfaq.com/5006 for some useful hints on how to post.
If you're looking for generic advice on how to deal with hierarchies,
then your best bet is to buy and read "Trees and Hierarchies in SQL" by
Joe Celko. This book describes several ways to model a hierarchy in SQL,
with their pros and cons.
You could also google for "nested sets model" and "adjacency list model"
to find information about two of the most common ways to represent a
hierarchy.
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)
.
- Follow-Ups:
- Re: A tree of location and site names..
- From: Rhonda Fischer
- Re: A tree of location and site names..
- References:
- A tree of location and site names..
- From: Rhonda Fischer
- A tree of location and site names..
- Prev by Date: Re: Set a dinamic varable in query
- Next by Date: Re: Working With Binary Data Types
- Previous by thread: RE: A tree of location and site names..
- Next by thread: Re: A tree of location and site names..
- Index(es):
Relevant Pages
|
|