I assume you're doing a <cfoutput> or <cfloop> on the query results directly, as you said you don't know the year is 'til you output.
One way might be to create a structure, loop over your query results and populate the structure as you go - then you can look at that structure and see where the gaps are (based on the lowest-value year and highest-value year data), and add the necessary keys with '0' (or whatever) in the right spots. Then do your output, looping over your structure and spitting out the values within. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Create robust enterprise, web RIAs. Upgrade to ColdFusion 8 and integrate with Adobe Flex http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:288592 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

