> Right, I'm not gonna address the whole thing (no time at the moment), but
a
> quick word about sub-queries
>
> They should be used in 2 ways - one to return a single result;
> select * from myTable where myValue=(select myValue from myOtherTable
> where...)
>
> Or to return multiple values
> select * from myTable where myValue in (select myValue from myOtherTable
> where...)
>
> The second is a lot more useful for what you're looking for
Right, but I don't see how that helps me. Neither of those two uses of
subqueries returns a LIST of values that can be used in a single field of
the parent query.
For example, if my mapping table looks like so:
ItemID CategoryID
----------------------------------
1 1
1 2
1 4
2 2
2 4
I would like the details query for ItemID 1 to have the following fields:
.Name - simply pulled from item table
.Desc - simply pulled from item table
.CategoryIDs - "1,2,4"
I've looked through a couple of my SQL books and haven't found an answer, so
maybe this isn't possible (using SQL 6.5, BTW). Its not THAT big of a deal
to run two queries.
Thanks for the help,
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.