>>While I am aware of most of the alternatives, I'm more interested in understanding the pratical reasons why this method is not used.
There would definitely be a performance problem, especially if the sub-queries are big queries. Although I didn't try it, I think one of these alternative would be to leave the sub-query where it is and just store its name in the above query, then use QUERY="#aboveQuery.subQueryName#" instead of QUERY="#aboveQuery.subQuery#". The result would be the same, but the sub-query would not have to be copied into the main query, and there would be a difference on performance. Another alternative would be to store the SQL code in the main query and perform the sub query only inside the loop. -- _______________________________________ REUSE CODE! Use custom tags; See http://www.contentbox.com/claude/customtags/tagstore.cfm (Please send any spam to this address: [EMAIL PROTECTED]) Thanks. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:212530 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

