Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
4
Reply
How to set where condition for aggregate function.
shahnid k
Jul 6 2017 5:46 AM
244
Reply
select
SUM
(dbo.GLAFS.OPENBAL) +
SUM
(dbo.GLAFS.NETPERD1)
AS
January
from
GLAFS
where
SUM
(dbo.GLAFS.OPENBAL) +
SUM
(dbo.GLAFS.NETPERD1) > 0
its giving an error "
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.
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
4
)
Next Recommended Forum
I am facing issues in selecting distinct users and results
How I create sql database with userName and Password