im trying to do a query thats driving me to drink.
i think i could get it to work if i could do one fairly simple thing. heres a boiled down example:
[tt]
idName idNum
-----------------
fred 6
fred 4
fred 17
sam 11
joe 17
[/tt]
what if i wanted to select all rows containing all idNames where the idNum = 17 in any case. In this example I would want all three rows containing the idName 'Fred' returned because there is a Fred with the idNum 17... as well as the one row containing the idName "joe".
as it is i can only think of how to do it using mutiple queries. one query to find the idNames, and additional queries to find the other rows containing those idNames. but i need to do a cfchart on the results, so the multiple query solution, in addition to being wasteful, doesnt work for me.
thanks for taking the time!
i think i could get it to work if i could do one fairly simple thing. heres a boiled down example:
[tt]
idName idNum
-----------------
fred 6
fred 4
fred 17
sam 11
joe 17
[/tt]
what if i wanted to select all rows containing all idNames where the idNum = 17 in any case. In this example I would want all three rows containing the idName 'Fred' returned because there is a Fred with the idNum 17... as well as the one row containing the idName "joe".
as it is i can only think of how to do it using mutiple queries. one query to find the idNames, and additional queries to find the other rows containing those idNames. but i need to do a cfchart on the results, so the multiple query solution, in addition to being wasteful, doesnt work for me.
thanks for taking the time!