Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Pass in Year and Quarter and get the fiscal start and end dates Expand / Collapse
Author
Message
Posted Saturday, September 25, 2010 11:28 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Thursday, May 10, 2012 6:07 AM
Points: 28, Visits: 10
Comments posted to this topic are about the item Pass in Year and Quarter and get the fiscal start and end dates
Post #993277
Posted Monday, September 27, 2010 6:01 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Monday, September 17, 2012 7:10 AM
Points: 869, Visits: 81
After correcting the errors I was able to run this query. Is it just me or shouldn't the first quarter of 2010 be 01-01-2010 to 3-31-2010, not 10-01-2009 to 12-31-2010. Why does this return the last quarter of 2009 dates??

I know some shops, like mine, have June as the beginning of the Fiscal year, so maybe his shop has October. Since there were no notes as to this, it's hard to tell.

The solution is interesting, but the date functions cover quarters already, or SQL use to cover this.

-Callie97
Post #993579
Posted Monday, September 27, 2010 7:22 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, May 10, 2012 7:58 AM
Points: 19, Visits: 64
As far as I know the quarter function went away a long time ago. Anyway, one thing to note is that this should be a single function (even though I don't like functions at all) with a @mode parameter. Say 0 for start and 1 for end.
Post #993635
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse