No, you shouldn't have to erase the code because it should automatically be cleared after the defected sensor has been replaced with a new sensor. The Crankshaft position sensor is on the rear portion of the engine against the firewall on the driver side and it is a blind spot so you'll have to work with either using mechanic mirror or just the feel of the bolt from the sensor. Here is a video that will show you both sensors and there locations.