SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Query Missing dates in years
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

hameedf
Starting Member

Pakistan
27 Posts

Posted - 10/01/2012 :  03:32:56  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

India
2210 Posts

Posted - 10/01/2012 :  05:11:34  Show Profile  Reply with Quote
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

India
52317 Posts

Posted - 10/01/2012 :  10:29:40  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000