> > > How would I do this if it is a standard parent/child table
> > > with the fields cat_id, catname, parent_cat_id, parent_catname?
> > > I think I now how the query would work but that is about it.
> >
> > I think you could do it by using a self-join and aliases for
> > columns drawn from one side of the join.
>
> I can't find any good information on joins to understand the
> method you are taking about. Do you have any idea where I could
> get some info on joins/self-joins for CF and Oracle? Can you give
> me an idea how a SQL statement to do this would be written. I'm am
> still kind of new to this.
Self-joins are actually pretty simple. Here's an example:
SELECT t1.namefield AS name1,
t2.namefield AS name2
FROM mysingletable t1,
mysingletable t2
WHERE t1.id = t2.parentid
ORDER BY t1.namefield,
t2.namefield
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.