Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2013
    Posts
    3

    Unanswered: SSIS Derived Column

    Hello

    Two questions regarding Derived Columns in SSIS

    1. In a if else expression if condition is false how do you keep the value of the source column eg: Name == "" ? "Unknown" : Name
    Above will change all the non blank values to Name and not the actual value
    in the Name Column eg. John

    2. I have a column (unicode string)that stores date and time (The source is flat file) Is it possible to write expression to select the 1st day of month based on that date, and use this derived column as input to a table with a datetime field.

    Thank You

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Do the conversions on the SQL side of SSIS (as expressions).
    1. CASE WHEN myCol = '' THEN 'Unknown' ELSE myCol END
    2. DateAdd(m, DateDiff(m, 0, myCol), 0)
    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •