subject: expressions in select list using subExpressions and aggregate function
This....
(column name*column name/100)-sum(bookval)
... will not work, because #3:
SQLsvr Rule:
When aggregate functions are used in a select list, the select list can contain only:
1. Aggregate functions.
2. Grouping columns from a GROUP BY clause.
3. An expression that returns the same value for every row in the result set, such as a constant.
Is there a better way than creating an intermediate table to hold the sum and calculationResult in separate columns, then
subtract one from the other in the next T-SQL statement?
Thanks.