I want to insert a parameter in a table using an update query that is based off of the time when you run it. The results will be the current fiscal year and quarter. Lets say you run the query today (9/29/06) then the query would give 200603 (current Fiscal year and quarter):
Before 3/31/2006 gives 200601 (gives first qtr of 2006)
Before 6/30/2006 gives 200602 (gives second qtr of 2006)
Before 9/30/2006 gives 200603 (gives third qtr of 2006)
Before 12/31/2006 gives 200604 (gives fourth qtr of 2006)
Is there a simple function or sql that can give you these parameters?
Before 3/31/2006 gives 200601 (gives first qtr of 2006)
Before 6/30/2006 gives 200602 (gives second qtr of 2006)
Before 9/30/2006 gives 200603 (gives third qtr of 2006)
Before 12/31/2006 gives 200604 (gives fourth qtr of 2006)
Is there a simple function or sql that can give you these parameters?