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
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Leap year fun

Author  Topic 

raydenl
Starting Member

16 Posts

Posted - 2009-02-23 : 19:37:03
Hi

I need help with the following query. I am trying to write a query that when querying Feb will always return values for 29 days even if the year is not a leap year. If the year is not a leap year the 29th should be equal to the average of the 28th Feb and the 1st March.

The table has these columns:

Date, Flow

20090201, 4.73
20090202, 5.76
...
20090228, 4.67
20090229, 6.83 (average of 28th and 1st)
20090301, 8.99

Thanks

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2009-02-23 : 21:07:36
You may wanna look this one:
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=83637
Go to Top of Page
   

- Advertisement -