I need to create a script that checks to see if a variable value is NULL, if it is then it executes the next SQL Task and if not then the package has finished.
I have this in a SQL 2000 DTS package script:
If isnull(DTSGlobalVariables("NextLoadDate")) Then
Main = DTSStepScriptResult_DontExecuteTask
Main = DTSStepScriptResult_ExecuteTask
As you can see, all I want to do is check to see if a variable is null then don't execute the next task.
But i cannot get it to work in a SQL 2005 SSIS package, so far I have created a script and come up with the following:
Public Sub Main()
If Dts.Variables("NextLoadDate").Value.ToString <> "" Then
Dts.TaskResult = Dts.Results.Success
Dts.TaskResult = Dts.Results.Failure
View Complete Post