- select SUM(dbo.GLAFS.OPENBAL) + SUM(dbo.GLAFS.NETPERD1) AS January from GLAFS where SUM(dbo.GLAFS.OPENBAL) + SUM(dbo.GLAFS.NETPERD1) > 0
How to set where condition for aggregate function.
An aggregate may not appear in the WHERE clause unless it is in a subquery contained in a HAVING clause or a select list, and the column being aggregated is an outer reference"
How can i resolve this issue. Please help.


Rafnas T PRank #280 · 8.8K reputationPosted Jul 6, 2017, 1:52 AM EDT
Rajkiran SwainRank #165 · 14.4K reputationPosted Jul 21, 2017, 9:41 AM EDT
Mitesh GadhiyaRank #4,768 · 326 reputationPosted Jul 24, 2017, 8:54 AM EDT