My Blog List

LOVE IS LIFE

#htmlcaption1 #htmlcaption2 Stay Connected

Pages

Showing posts with label SSIS - Script task variable handling. Show all posts
Showing posts with label SSIS - Script task variable handling. Show all posts

Friday, June 27, 2014

SSIS - Script task export import variable

  public void Main()
        {
            // TODO: Add your code here

            string str = Dts.Variables["User::Internal_Sales_File_Name"].Value.ToString();

            str = str.Substring(str.Length - 9, 4);

            Dts.Variables["Internal_Sales_Year"].Value = str;

           // string test = Dts.Variables["User::Internal_Sales_Year"].Value.ToString();

       
            Dts.TaskResult = (int)ScriptResults.Success;
        }
    }

}