Aug 5, 2005 #1 tbonehwd IS-IT--Management Jul 28, 2005 45 US For example: Select Sum(ORDERS.UNITS) as UNITS_PURCH, Sum(RETURN.UNITS) as UNITS_RET, Sum [UNITS_PURCH]-[UNITS_RET] as NET_UNITS I am just curious if you can sum a previously calculated field and if so what is the correct syntax? Thanks, TBonehwd
For example: Select Sum(ORDERS.UNITS) as UNITS_PURCH, Sum(RETURN.UNITS) as UNITS_RET, Sum [UNITS_PURCH]-[UNITS_RET] as NET_UNITS I am just curious if you can sum a previously calculated field and if so what is the correct syntax? Thanks, TBonehwd
Aug 5, 2005 #2 PaultheS Programmer May 12, 2005 92 CA Wouldn't NET_UNITS just be one value? I don't see why you'd need to sum it. [UNITS_PURCH]-[UNITS_RET] as NET_UNITS Upvote 0 Downvote
Wouldn't NET_UNITS just be one value? I don't see why you'd need to sum it. [UNITS_PURCH]-[UNITS_RET] as NET_UNITS
Aug 5, 2005 #3 jebry Programmer Aug 6, 2001 3,006 US Hi! Like this: Select Sum(ORDERS.UNITS) as UNITS_PURCH, Sum(RETURN.UNITS) as UNITS_RET, Sum Sum(ORDERS.UNITS) - Sum(RETURN.UNITS) as NET_UNITS Of course, if you plan on using this in a report then it might be quicker to do the calc in a text box. Then you could us UNITS_PURCH and UNITS_RET. hth Jeff Bridgham Purdue University Graduate School Data Analyst Upvote 0 Downvote
Hi! Like this: Select Sum(ORDERS.UNITS) as UNITS_PURCH, Sum(RETURN.UNITS) as UNITS_RET, Sum Sum(ORDERS.UNITS) - Sum(RETURN.UNITS) as NET_UNITS Of course, if you plan on using this in a report then it might be quicker to do the calc in a text box. Then you could us UNITS_PURCH and UNITS_RET. hth Jeff Bridgham Purdue University Graduate School Data Analyst
Aug 5, 2005 Thread starter #4 tbonehwd IS-IT--Management Jul 28, 2005 45 US Thank you, I take it you can't just Sum a previously calculated field. Upvote 0 Downvote
Aug 5, 2005 #5 PaultheS Programmer May 12, 2005 92 CA Correct, to answer your general question, Access doesn't seem to like that. Upvote 0 Downvote