For some reason, the utility for managing special activities doesn't have an option to remove the activity altogether from the list. I was trying to do it in SSMS, but I can't find where the connection between lists and the constituents on them lives. Is there a way to join two (or more) tables to remove an activity from just the people on the three lists it was accidentally applied to? We can live with it if not (it's a matter of the regular party being added instead of the VIP party, so we can just add the VIP party and ignore the regular).
Thanks!Anne RobichauxThe Historic New Orleans Collection
I've removed activities from a list of constituents with this code. Just replace <list_no>, date, and notes with your specific info. I like to do a select first to make sure I'm getting the results I want.
SELECT sa.*
FROM T_SPECIAL_ACTIVITY sa
JOIN dbo.T_LIST_CONTENTS lc ON lc.customer_no = sa.customer_no
WHERE sa.notes like 'XXX%'
AND sa.sp_act_dt = '2023-04-15 00:00:00.000'
AND lc.list_no = <list_no>
DELETE sa
Thank you!!
This worked perfectly. Thanks, again!