Click here to Skip to main content
15,892,697 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

I have to calculate no of Sunday in a year with date in sql server.


thanking you
mohd wasif
Posted

How about use of datename() in sql. You can compare the date with the text representation, and use simple addition in condition.
 
Share this answer
 
Comments
CodingLover 2-May-11 5:14am    
Check the following link, and I'm not sure that master data usage is safe or not.

http://sql-server-performance.com/Community/forums/p/28155/151034.aspx
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900