TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
shahnid k
NA
61
15.5k
How to set where condition for aggregate function.
Jul 6 2017 5:46 AM
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.
Reply
Answers (
4
)
I am facing issues in selecting distinct users and results
How I create sql database with userName and Password