Skip to content
Advertisement

I’m going to get the ten day sales report and i want to return 0 if there is not record for each day

This is my code that works fine but returns data only for the days the contract exists I want to get value for each day and return zero if it doesn’t any record for that day

Advertisement

Answer

At First Create a table which will hold all the 10 Days From your Contract Date,then Left join the result set of your Query with this Table as follows,

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement