Run Job based on Fiscal Calender

Last Post 21 May 2007 06:40 AM by GoodFella3993. 2 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
GoodFella3993
New Member
New Member

--
19 May 2007 02:41 AM
I have a DTS Job that creates a financial report based on the fiscal calender month. Is there anyway to have the scheduler run this report based on the fiscal calender as well? Or is there any way around this?

Thanks,
Marc
GoodFella3993
New Member
New Member

--
21 May 2007 06:40 AM
Heyyyy now. Thats an excelent idea. Good thinking!
GoodFella3993
New Member
New Member

--
21 May 2007 08:46 AM
DECLARE @today smalldatetime
SET @today =cast(getdate() as smalldatetime)

SELECT FISCAL = CASE WHEN dbo.fiscal_month(@today)= @today THEN 1 ELSE 0
END

This code returns a 1 if todays date is the beginning of the fiscal month (using a fiscal_month function).

What are some ways to use this code to accomplish my goal?

As of now, I think I will create one dts package that simply runs and checks for the fiscal month. If todays date is not the beginning of the fiscal month it will skip the second step and simply end. If todays date is the beginning of the fiscal month, it will then proceed to the second step where I plan to kick off the REAL dts job through VB Script. In the future, when I have other reports running on the fiscal month, I will simply add the job to the list of jobs in step 2.

Any suggestions to this? Pros? Cons? Alternatives?
You are not authorized to post a reply.

Acceptable Use Policy