May 28, 2010 at 4:11 pm
I'm trying to use a script to set the value of a variable to an expression. The code I'm using is below. What am I doing wrong?
Public Sub Main()
'
' Add your code here
dts.Variables("varCurrentPeriod").Value = (DT_WSTR,4) FLOOR(DATEDIFF("mm", (DT_DATE)"27-Jan-1989",GETDATE()))
'
Dts.TaskResult = Dts.Results.Success
End Sub
May 28, 2010 at 8:11 pm
In your script task, did you set the variable to be read/write?
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
June 1, 2010 at 1:48 am
This was removed by the editor as SPAM
June 1, 2010 at 12:36 pm
Wow, that really worked! I've learned more about SSIS 2005 in the past month than in the previous 2 years! Thanks so much!
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply