Added an activity to a list of constituents, need removed. Does anyone know how to do this without going through manually to each individual constituent?

Hello All,

Accidentally added an activity to a list of constituents. Is there a way in SSMS to blanket remove this activity entry from these records? Not seeing anything for activity outside of the Update and Insert utility in the documentation. 

Thanks,

Nathaniel 

Parents
  • Nathaniel,

    I actually just did this a few days ago.  It could not be easier.  Simply find something about those entries that uniquely defines them; e.g. that the performance name = "Perf Name", or maybe run against created_by = "[me]" and create_dt > "[this morning]".  If nothing else has been created today, you could simply do where the customer_no is in that list and it was created that day.  Anything that uniquely defines that list of patrons and, specifically, those particular activities on those patrons' accounts.

    Then basically, just create a statement like this one (below) until your results are exactly the list of things you want deleted.

    SELECT    sa.*
    FROM    T_SPECIAL_ACTIVITY sa
    WHERE    sa.perf = 'Perf Name'
        AND    sa.create_dt > '2019-10-09 00:00:00.000'

    Then just replace the word "SELECT" with the word "DELETE" and remove the ".*" after the letters "sa" in the first line.


    SELECT    sa.*
    FROM    T_SPECIAL_ACTIVITY sa
    WHERE    sa.perf = 'Perf Name'
        AND    sa.create_dt > '2019-10-09 00:00:00.000'

    Best of luck!

    John

  • Oops.  I meant to put the delete version at the end there.  E.g.

    DELETE    sa
    FROM    T_SPECIAL_ACTIVITY sa
    WHERE    sa.perf = 'Perf Name'
        AND    sa.create_dt > '2019-10-09 00:00:00.000'

Reply Children
No Data