Seems like this should be easy, but I can't think how to construct 
a query that will grab the name of a parent category in the following 
situation...

My category table consists of:
CategoryID
CategoryName
ParentCategoryID

If a category has a parent, ParentCategoryID carries the ID of the 
parent. If it doesn't, ParentCategory = 0.

I'm trying to create a single query listing all the categories, and 
ALSO including a query column called ParentCategoryName, 
containing the name of the parent if that category has one. Could 
do it easily if the info were in 2 tables, but not sure how when all 
the info is in 1 table...

Gene Kraybill



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to