Home Forums SQL Server 2016 SQL Server 2016 - Development and T-SQL query get 0 when month not exist in MSSQL RE: query get 0 when month not exist in MSSQL
Phil Parkin
SSC Guru
Points: 247210
More actions
October 24, 2016 at 12:53 pm
#1908448
A LEFT JOIN from a calendar table is probably what you need.
Take a read of this link and see whether it helps you.