Quick question for the devs regarding defect 62227 -- were there plans to correct the data in this table with a migration step for the 12.5.1 upgrade? Or is it up to each DBA to do that themselves?
Also curious about the following -- I see T_ATTENDANCE is in use by RP_ATTENDANCE_BY_PERFORMANCE which is what necessitates the correct customer numbers, but attendance data is also written to T_ORDER_SEAT_HIST, and the customer number in this table doesn't appear to be affected by merges either. Maybe that's all by design since T_ORDER_SEAT_HIST is always queried based on order ID?
In case someone comes across this and needs a fix, here's the script I used:
UPDATE a SET customer_no = b.customer_no FROM T_ATTENDANCE a JOIN TX_CUST_KEYWORD b ON a.customer_no = b.key_value AND b.keyword_no = 6; -- Merged ID
And here's what I added to LP_CONST_MERGE in version 12.1.2 (removed in 12.5 as is no longer necessary).
-- Needed for v12.1.2, ref defect 62227. IF @merge_stage = 'A' BEGIN; UPDATE [dbo].T_ATTENDANCE SET customer_no = @kept_id WHERE customer_no = @deleted_id; END;