SSIS Script task If conditon

  • i have a variable value that coming from batch file as N and Y

    in the package i kept hfcol  as string  . there is another variable in the package called count string

    in the script task i want to set

    if hfcol = N then count = 1

    if hfcol = y then count = 2

     

    how to write this condition in SSIS script task?

  • mcfarlandparkway wrote:

    i have a variable value that coming from batch file as N and Y

    in the package i kept hfcol  as string  . there is another variable in the package called count string

    in the script task i want to set

    if hfcol = N then count = 1

    if hfcol = y then count = 2

    how to write this condition in SSIS script task?

    Are you asking for some help writing a simple C# IF condition? If so, there are plenty of examples online. If not, please expand on exactly what you are having problems with.


  • If you want to know what an If statement looks like, then the documentation is here: if-else (C# Reference). If you want to know how to use variables in a Script Task, there's also an appropriately named document: Using Variables in the Script Task.

    If you don't have any luck, show us your C# code, so we can help debug it.

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply