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
Vandana
1.1k
590
76.6k
How to show zero value
Apr 3 2017 5:37 AM
Hey,
I have an issue that I have to show zero amount if there is no record in the table column.
select DATEPART(mm,ApptDate)as Month, SUM(coalesce(AgentAmount,0)) as [Tolling]
from Test.dbo.LeadTable
where
DATEPART(mm,ApptDate)='1'
and DATEPART(yy,ApptDate)='2017'
GROUP BY DATEPART(mm,ApptDate)
There is no data in jan 2017 but i want to show 0 value.
Please help me
Reply
Answers (
4
)
Sql query for hotel reservation
how to perform join operations on sqlite.db for mobile app