Ok I hope someone can help me with this. What I have is one table with rows as below
org_type | year | d_1 | d_2 | d_3 adm 2004 01/01/2004 22/06/2004 12/12/2004 adm 2006 31/01/2006 12/05/2006 12/12/2006 What I want to get is d_2 and d_3 for all orgs for one year and d_1 for all orgs for another year, all in one row. so the results would look something like this something like this adm - d_1(where year = 2006) - d_2(where year = 2004) - d_3(where year = 2004) imp - d_1(where year = 2006) - d_2(where year = 2004) - d_3(where year = 2004) exp - d_1(where year = 2006) - d_2(where year = 2004) - d_3(where year = 2004) etc... What is the best way to do this, in the query not the front end? I used a subselect from query to get the d_1 for 2006 but it returns 2 rows for each org_type: one for 2004 and one for 2006. Hope this makes sense to someone. I am thinking of using a function possibly to get d1 for type. Thanks for reading. cheers Martin ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:232689 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

