Change Placename if Before or After Date

1 vote

Change Placename if Before or After Date

As we all know, boundaries of counties and states changed as America expanded and the population increased. For example, certain counties in Virginia formed the new state of West Virginia on June 20, 1863 during the Civil War. I have found that my database contains events which occurred in Greenbrier County, Virginia in 1888, which is after the County became part of West Virginia. Similarly, some events have a date of 1840 for Greenbrier County, West Virginia, which is before WV became a state.

I have been correcting them manually but there are probably 200-300. When I find a place that occurred in Greenbrier, Virginia before June 20, 1863, I change the placename to “Greenbrier, Virginia (now in West Virginia)”. Even FAG

Is it possible to create an SQL script to correct the above errors?
Example 1: change the placenameA to placenameB if the event date is after Date1
Example 2: change the placenameA to placenameB if the event date is before Date2

Of course, if a script could be written containing variables …. so that each time the script ran it would ask for the original placename, the new placename, if the event date was before/on-or-after a particular date.

Thanks in advance to those who can write such a script (I cannot and I’ve tried AI for over 2 hours, but am not that experienced with it and didn’t have any luck).

OR if I am making this more difficult than it actually is and there is a simpler solution, please tell me.

Jaime Teas Jaime Teas shared this idea