Hi everyone!
I'm hoping someone will have some guidance on how to fix an error created by the Manage Special Activity Utility.
Someone recently utilized the Manage Special Activity utility but unfortunately used an incorrect List of patrons and created incorrect data for the wrong people. The activity is a way for our development staff to track specific committee/board meetings. They were able to update the activity to imply that the 'event' was cancelled, which was a quick fix, but we'd like for the individuals who received this event in error to have that table updated.
How would one go about fixing this?
I'm still learning some SQL, but the only thing I can see is the table TR_SPECIAL_ACTIVITY and I know the ID of the activity we want to take away and I know the List No of the individuals who incorrectly updated. The problem is, I only want to delete the entry that was created for the incorrect list at that moment... not delete the activity from the table altogether. That's where I'm stuck.
When I look at the data object: RP_GLOBAL_ACTIVITY_INSERT_UPDATE, it says the mode must be in "I" or "U" (insert or Update), no "D" (delete/drop) option. :-(
Does anyone have any suggestions how to delete this insert made in error before I head to our support people and bother them? :)
Thanks,
Tiffany Evans
Database Coordinator
Huntington Theatre Company
Boston, MA
First you want to make absolutely certain that you have the correct records.
Go to TR_SPECIAL_ACTIVITY and determine the id of the item that was inserted in error. Let’s say it is “29.”
Go to List Manager and get the number of the list that was used to create the bad records that you want to get rid of. Let’s say it is 12000.
In Microsoft SQL Server Management Studio, run the following query:
select * from t_special_activity
where sp_act = 29
and customer_no in (select customer_no from T_LIST_CONTENTS where list_no = 12000)
If your activity is one that gets used for several activities, you may get too many results to find a sample of what you’re looking for to delete. Try to limit your results by using one of the other fields. For instance, you might include the date of the activity:
and sp_act_dt = '2013-04-28 00:00:00.000'
Check your results to make sure that you have exactly the number of patrons that you expect to have.
Once you are happy that you are only pulling what you want to delete, then update the query to read:
delete t_special_activity
______________________________Lucie SpielerIT Development and Training ManagerFLORIDA GRAND opera