Hi Seth,

    This book also has info on cross Tabulations which what you want ....
Also there are scripts here http://www.swynk.com/sqlhome/6xlibrary.asp for
doing this ...
BTW It's an excellent site for SQL
~Justin

>Have a look at Joe Cleko's books SQL for Smarties  . He has lots on these
>types of relationships IE trees.
>Also there are lots of SQL functions examples to answer questions like

>Path Enumeration
>Finding root and "Leaf " nodes
>Subtree deletetion
>etc....

>IMO His books are a must have for "Real World SQL users" :-)

>Checkem' out at :
.http://www.amazon.co.uk/exec/obidos/ASIN/1558604324/qid=961587236/sr=1-1/02
6
-2836789-6296449
http://www.amazon.co.uk/exec/obidos/ASIN/1558603239/qid=961587236/sr=1-3/026
-2836789-6296449


~ JustinMacCarthy


----- Original Message -----
From: Seth Petry-Johnson <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 21, 2000 12:11 AM
Subject: Need help with a SQL query


> Sorry about the non-descriptive subject, but I'm tired and really couldn't
> think of a way to describe my question in one line <g>.
>
> I have a database table of product information and a database table of
> product category information.  Each product may exist in more than one
> category, so I created a "mappings" table that simply contains
> ItemID-CategoryID pairs.  This is all well and good.
>
> I am trying to write a product details query that includes a comma
delimited
> list of the CategoryIDs that the product belongs to.  Currently I run two
> queries: one for the data from the product table and another for the
> CategoryIDs from the mappings table.  Then I create a list of the Category
> IDs and manually add the list to the query of other product data.
>
> Is there a way to get SQL to do this for me in one query?  As far as I
know
> subqueries are only useful when they return a single value, which won't
> quite work here.  Any ideas?
>
> Thanks in advance,
> Seth Petry-Johnson
> Argo Enterprise and Associates
>
>
>
> --------------------------------------------------------------------------
----
> 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.
>
>

------------------------------------------------------------------------------
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