Ok, I see what's going on. You want to out put your records in a group, thats a CF issue, not a SQL issue.
What you need to do is to use ORDER BY to get your records in the correct order then user the GROUP attribute of the CFOUTPUT tag GROUP BY in SQL is for compiling related data and performing calculations, such as in my example, I wanted to know how many products were in the Products table, but instead of just knowing how many altogether, I wanted to know BY category, which is what the SQL GROUP BY does. -- Alan Rother Macromedia Certified Advanced ColdFusion MX 7 Developer ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:243368 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=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54