placebo2000
New Member
- Joined
- May 8, 2009
- Messages
- 29
I've been looking at the "USDA National Nutrient Database for Standard Reference, release 23"
http://www.ars.usda.gov/Services/docs.htm?docid=8964
And pulling off data into Excel.
I have this query (which can be found in the database sr23.mdb):
This does everything I want to do, except I can't work out how to replace the column headers NUT_DATA.NDB_No with NUTR_DEF.NutrDesc. What it does is produce a list of individual food stuffs and their nutritional content, but with the nutrient code rather than description.
I'd also like to add a food group description column, FD_GROUP.FdGrp_Desc.
I can do this either by using a different query and a pivot table in excel or by using the original query and putting in another row in Excel with INDEX and MATCH, but I don't want to do it that way.
I use Excel and Access 2007.
Any help would be appreciated! Thanks.
http://www.ars.usda.gov/Services/docs.htm?docid=8964
And pulling off data into Excel.
I have this query (which can be found in the database sr23.mdb):
Code:
TRANSFORM Avg(NUT_DATA.Nutr_Val) AS AvgOfNutr_Val
SELECT NUT_DATA.NDB_No, FOOD_DES.Long_Desc
FROM FOOD_DES
INNER JOIN NUT_DATA ON FOOD_DES.NDB_No = NUT_DATA.NDB_No
GROUP BY NUT_DATA.NDB_No, FOOD_DES.Long_Desc
PIVOT NUT_DATA.Nutr_No;
I'd also like to add a food group description column, FD_GROUP.FdGrp_Desc.
I can do this either by using a different query and a pivot table in excel or by using the original query and putting in another row in Excel with INDEX and MATCH, but I don't want to do it that way.
I use Excel and Access 2007.
Any help would be appreciated! Thanks.