问题 ssis, roll back date

  • Friday, December 07, 2012 6:14 PM
     
     

    This is my original data:

    Store         Time               Date
    A               0:33           9/7/2012
    A               0:43         9/7/2012
    C              14:56         9/6/2012
    F               13:30         9/2/2012
    B              15:00         9/5/2012
    H              18:01         9/3/2012

    Data Types:
    Store-String
    Time-Date      ( Eastern Time) and in military format
    Date-Date


    This is the expression I use for time adjustment:

    ((Store >= "A") && (Store <= "D")) ? DATEADD("Hh",-3,Trans_Time) : (((Store_Nbr >= "E") && (Store <= "H")) ? DATEADD("Hh",-2,Trans_Time) : Trans_Time)

    How do I change the expression so I could include the rolling back of dates?

    This is the condition:

     stores  A-D  and transaction time bet 0:00 - 14:59 -- roll back 1 day

     stores E-F and transaction time bet 0:00-13:59 -- roll back 1 day also

All Replies

  • Tuesday, April 09, 2013 2:11 PM
    Moderator
     
     

    Moderators: this is a SSIS expression, thus the tread belongs to the SSIS forum.

    Msdn_user1: to solve your issue you have at least two ways:

    1. Use the Conditional Split SSIS component to direct the package execution flow, or
    2. Use Precedence Constraints to proceed with rolling back the dates conditionally.

    Arthur My Blog