locked
Checking Data Format while extracting RRS feed

  • Question

  • Hi,

    I have need where i have an excel file with a field whose data looks like

    Example 1: 8AM-8PM   Mon-Sat

    Example 2: 9AM-3PM   Mon-Fri, 6PM-8PM Mon-Fri

    Example 3: 8AM-8PM   Daily

    I want to make sure if data is not like in example 1 & 2  format, i should discard the row. I know it might need a script task or some extensive deep T-SQL. would someone be able to help?

    Thank You

    Thursday, June 14, 2012 4:55 PM

Answers

  • I suggest you do this:

    1. You just import this column (as text) normally (using the Excel Source);
    2. Then drag and drop a Conditional Split from the Toolbox when in DFT, set it so any text other than 'Daily' goes to an output say called Discard, the "default" one you capture for further processing (obviously) The expression may be like FINDSTRING( Column1 , "Daily", 1 ) > 0

    A sample on Conditional Split: http://www.codeproject.com/Articles/69325/Using-Conditional-Split-data-Transfer-in-SSIS-2008


    Arthur My Blog

    • Proposed as answer by Eileen Zhao Monday, June 18, 2012 9:04 AM
    • Marked as answer by Eileen Zhao Wednesday, June 20, 2012 5:57 AM
    Thursday, June 14, 2012 8:03 PM

All replies

  • is the excel column text of datatime?

    Please mark the post as answered if it answers your question | My SSIS Blog: http://microsoft-ssis.blogspot.com | Twitter

    Thursday, June 14, 2012 6:03 PM
  • Nope, Text
    Thursday, June 14, 2012 6:04 PM
  • I suggest you do this:

    1. You just import this column (as text) normally (using the Excel Source);
    2. Then drag and drop a Conditional Split from the Toolbox when in DFT, set it so any text other than 'Daily' goes to an output say called Discard, the "default" one you capture for further processing (obviously) The expression may be like FINDSTRING( Column1 , "Daily", 1 ) > 0

    A sample on Conditional Split: http://www.codeproject.com/Articles/69325/Using-Conditional-Split-data-Transfer-in-SSIS-2008


    Arthur My Blog

    • Proposed as answer by Eileen Zhao Monday, June 18, 2012 9:04 AM
    • Marked as answer by Eileen Zhao Wednesday, June 20, 2012 5:57 AM
    Thursday, June 14, 2012 8:03 PM