troubleshooting Question

fill in row (date) when chronological date is missing in result

Avatar of 25112
25112 asked on
Microsoft SQL ServerMicrosoft SQL Server 2008SQL
7 Comments5 Solutions606 ViewsLast Modified:
in the below query, how can you bring a value of zero on the row when there is no value returned for that date in the query?

select top 1000  CONVERT(VARCHAR(10), backup_start_date, 120) Date, count(*) VERIFYNumberOfLogBackupsPerDay
from msdb..backupset where database_name = 'cognox_bk' and type ='L'
group by CONVERT(VARCHAR(10), backup_start_date, 120)
order by 1 desc
ASKER CERTIFIED SOLUTION
Rimvis

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 5 Answers and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 5 Answers and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros