Does anyone have an easy way to delete multiple performances in one fell swoop? Use case: When you make a mistake while running the Product Creation tool and create a large number of performances with an error that cannot be updated through Season Manager.
I was thinking about trying to mess around with TP_DELETE_PERFORMANCE in Test, to see if I could make it work for a set of performances, but wanted to check if anyone else already had a solution.
Thanks!
Jennifer
Declare @DoDelete bit = 0,@CurrPerfNo int = 0Declare @tblPerf table (PerfNo int,PerfDate datetimeprimary key (perfNo))insert into @tblPerfSELECT perf_no , perf_dt FROM T_PERF WHERE 1=1 AND Perf_dt BETWEEN '2/1/22' AND '1/1/23' AND perf_code like '%GADA' AND prod_season_no = 21645 --basically whatever logic you want to apply'Select @@ROWCOUNT as PerfCountSelect @CurrPerfNo = Min(PerfNo) from @tblPerf While @DoDelete = 1 and @CurrPerfNo is not nullBegin EXEC TP_DELETE_PERFORMANCE @CurrPerfNo Select @CurrPerfNo = Min(PerfNo) from @tblPerf where PerfNo > @CurrPerfNoendSelect * from T_PERF where perf_no in (Select PerfNo from @tblPerf)