Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Query Missing dates in years

Author  Topic 

hameedf
Starting Member

27 Posts

Posted - 2012-10-01 : 03:32:56
Hello experts !

I need some urgent help. I need to query data in years suppose how many missing dates . The query show the missing dates where the data is not entered.

Hameed

bandi
Master Smack Fu Yak Hacker

2242 Posts

Posted - 2012-10-01 : 05:11:34
Hi,

Check the following links

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=153200
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=172923

--
Chandu
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-10-01 : 10:29:40
you need to have a calendar table for that and use it to left join to your table.
see code I've given in link above to create a calendar table and using it in LEFT JOIN

http://visakhm.blogspot.com/2010/02/generating-calendar-table.html

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -