Forum

Please or Register to create posts and topics.

Delete all text from person notes

When importing gedcoms from Wikitree, a "person note" is created with text beginning with "== Biography ==" followed by notes particular to each person.  See attached screenshot sample.  Is there a way to get rid of all of this i.e., delete the entire note?

Hopefully, this is one of my easier requests 😉

Uploaded files:
  • Capture.JPG

Not tested, but the following should work

UPDATE PersonTable
SET Note= ''
WHERE Note LIKE '%== Biography ==%';

If you need to delete less than the whole note, then the script would be more complicated to substring out just that part you want to get rid of.

I questioned whether to set Person.Note to NULL or to a zero length string. In my database, all the empty Person.Note values are a zero length string, so I used that in the script rather than NULL.

Jerry, thanks so much!  I figured this was a simple one, but still am most appreciative of the time you spent on it.