This is really more of a SQL question rather than a Cold Fusion
question... but...I am working on a project where I have 2 tables set up to
hold information.  The reason why I use 2 tables is because for every record
in table A there could be 1 or many records in table B.  So, my problem is
when I do a query, and more than one record exists in table B, my query
returns more than one record.  I need the query to return just one record,
but with the all the information from table B in a format that I could use
it.  Say, a comma delimited list.

Here is the code I'm using for the query now:

<cfquery name="getCategoryInfo" datasource="#ds#" dbtype="ODBC">
        SELECT RT_Category.CatID, RT_Category.CatIsValid,
RT_Category.CatName, RT_Category.CatDesc, RT_Category.CatTemplateName,
RT_Category.CatHeader, RT_Category.CatFooter, RT_Category_Context.CatID,
RT_Category_Context.CatSubCatOf
        FROM RT_Category, RT_Category_Context
        WHERE RT_Category.CatId = RT_Category_Context.CatID
</cfquery>

Any help anyone could provide would be most appriciated.

Thanks.
James.
------------------------------------------------------------------------------
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.

Reply via email to