How to Shift Performances into Different Production Seasons?

We hadn't built our "First Friday" Production Season for FY24 until yesterday, not realizing that our teammate had already input all of her First Friday events for the rest of the year using the FY23 First Friday Production Season (our FY starts July 1, so some of them went into the wrong FY Production Season). Oops! 

Is there a way to move all of them (there are at least 6 performances that need to get switched) into the correct Production Season? We really don't want to have to delete and re-build everything if it's avoidable. 

Parents
  • You'll need someone with access to SSMS (SQL). Here is the script I use.

    /*
    ***FIND and UPDATE the Production Season on a given Performance***
    Created by Michael Dorsey MN Zoo
    Based on Monthly_Convert_to_Membership - Neil Cole
    --Has an Output statement so that it displays the results before committing the transaction.
    
    --Amended by Neil Cole 5/17/21
    --Make sure the new Prod_Season and Season(s) have already been created.
    --Make sure that you know how the mapping results should look before running.
    --Made it more general so as to do all perfs in a production season with a specific performance name.
    --Added a From statement so the update statement could do a join with T_INVENTORY.description.
    --
    */
    
    DECLARE @ReplaceProdSeason TABLE (perf_no INT, old_prod_season INT, new_prod_season INT, old_season INT, new_season INT)
    DECLARE @OldProdSeason int = 34619
    DECLARE @NewProdSeason INT = 25511
    DECLARE @NewSeason int = 222
    --DECLARE @PerfNo int = 31966
    
    Begin TRANSACTION A
    
    update T_PERF 
           
    
    SET T_PERF.prod_season_no = @NewProdSeason, T_PERF.season = @NewSeason
    --If you don’t need to assign to a new season, comment out the season part above in the set section.
    OUTPUT DELETED.perf_no, DELETED.prod_season_no, INSERTED.prod_season_no, DELETED.season, INSERTED.season
    INTO @ReplaceProdSeason
    
    FROM T_PERF
           join T_INVENTORY on T_INVENTORY.inv_no = T_PERF.perf_no
    where 
           --T_PERF.perf_no = @PerfNo
           T_PERF.perf_no in (select T_PERF.perf_no FROM T_PERF WHERE T_PERF.prod_season_no = @OldProdSeason)
           and T_INVENTORY.description = 'Hybrid Camp Admission'
    --could be like instead of ='s
    
    SELECT * FROM @ReplaceProdSeason
    ;
    /* 
    If ok, then highlight and execute:
    COMMIT TRANSACTION A;
    
    If not ok, then Rollback transaction highlight & execute:
    ROLLBACK TRANSACTION A;
    */
    

    What is nice about the script is that it will display the changes before you commit the transaction. In other words, you can quickly check for errors on your part and roll it back. Make sure you absolutely know which performance numbers are supposed to be moved and to what production season (and season).

Reply
  • You'll need someone with access to SSMS (SQL). Here is the script I use.

    /*
    ***FIND and UPDATE the Production Season on a given Performance***
    Created by Michael Dorsey MN Zoo
    Based on Monthly_Convert_to_Membership - Neil Cole
    --Has an Output statement so that it displays the results before committing the transaction.
    
    --Amended by Neil Cole 5/17/21
    --Make sure the new Prod_Season and Season(s) have already been created.
    --Make sure that you know how the mapping results should look before running.
    --Made it more general so as to do all perfs in a production season with a specific performance name.
    --Added a From statement so the update statement could do a join with T_INVENTORY.description.
    --
    */
    
    DECLARE @ReplaceProdSeason TABLE (perf_no INT, old_prod_season INT, new_prod_season INT, old_season INT, new_season INT)
    DECLARE @OldProdSeason int = 34619
    DECLARE @NewProdSeason INT = 25511
    DECLARE @NewSeason int = 222
    --DECLARE @PerfNo int = 31966
    
    Begin TRANSACTION A
    
    update T_PERF 
           
    
    SET T_PERF.prod_season_no = @NewProdSeason, T_PERF.season = @NewSeason
    --If you don’t need to assign to a new season, comment out the season part above in the set section.
    OUTPUT DELETED.perf_no, DELETED.prod_season_no, INSERTED.prod_season_no, DELETED.season, INSERTED.season
    INTO @ReplaceProdSeason
    
    FROM T_PERF
           join T_INVENTORY on T_INVENTORY.inv_no = T_PERF.perf_no
    where 
           --T_PERF.perf_no = @PerfNo
           T_PERF.perf_no in (select T_PERF.perf_no FROM T_PERF WHERE T_PERF.prod_season_no = @OldProdSeason)
           and T_INVENTORY.description = 'Hybrid Camp Admission'
    --could be like instead of ='s
    
    SELECT * FROM @ReplaceProdSeason
    ;
    /* 
    If ok, then highlight and execute:
    COMMIT TRANSACTION A;
    
    If not ok, then Rollback transaction highlight & execute:
    ROLLBACK TRANSACTION A;
    */
    

    What is nice about the script is that it will display the changes before you commit the transaction. In other words, you can quickly check for errors on your part and roll it back. Make sure you absolutely know which performance numbers are supposed to be moved and to what production season (and season).

Children
No Data