Set order date, appeal & source to null values post rollover

Sorry for the 101, but we're under the gun to get renewal forms dropped and don't have a whole lot of time to dilly dally.

Artistic has gotten creative with our upcoming season and post rollover, we get to touch every order. Yay for us.  When we are done, we want to clear the appeal, source and order date. 

Does anyone already have a script that does that?

Parents
  • I think what I need to know is ... is this safe and have I forgotten anything?

    begin tran

    UPDATE T_ORDER

    SET order_dt = CAST(NULL AS DATETIME), appeal_no = null, source_no = null, class = null, channel = null

    WHERE MOS = 8 AND create_dt > '2018-01-30'

    --commit tran

    UPDATE T_LINEITEM

    SET line_source_no = CAST(NULL AS int)

    WHERE line_source_no = 6324

     

Reply
  • I think what I need to know is ... is this safe and have I forgotten anything?

    begin tran

    UPDATE T_ORDER

    SET order_dt = CAST(NULL AS DATETIME), appeal_no = null, source_no = null, class = null, channel = null

    WHERE MOS = 8 AND create_dt > '2018-01-30'

    --commit tran

    UPDATE T_LINEITEM

    SET line_source_no = CAST(NULL AS int)

    WHERE line_source_no = 6324

     

Children