> > 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
>
First off I want to thank you sooo much for the help. Second off, sorry for
all of the question. ;-)
With that said. What do you think of this?
Table name is:
pcategory
field names are:
cat_id, cat_name, cat_parent_id, cat_parent_name
This is my query
SELECT
t1.cat_id AS cat_id,
t1.cat_name AS cat_name,
t1.cat_parent_id AS cat_parent_id,
t2.cat_id AS sub_cat_id,
t2.cat_name AS sub_cat_name,
t2.cat_parent_id AS cat_parent_id,
t3.cat_id AS sub_sub_cat_id,
t3.cat_name AS sub_sub_cat_name,
t3.cat_parent_id AS sub_cat_parent_id,
FROM
pcategory t1,
pcategory t2,
pcategory t3
WHERE
t1.cat_id = 0
AND
t2.cat_parent_id = t1.cat_id
AND
t3.cat_parent_id = t2.cat_id
ORDER BY
t1.cat_name,
t2.sub_cat_name,
t3.sub_sub_cat_name
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
------------------------------------------------------------------------------
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.