DECLARE @today smalldatetime
SET @today =cast(getdate() as smalldatetime)
SELECT FISCAL = CASE WHEN dbo.fiscal_month(@today)= @today THEN 1 ELSE 0
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?