i dont thnk its that 02 sensor... u can quickly diagnose it by forcing your car into "open loop" mode which should make it run w/ the preset specs burned into the car's PC <just unplug the connector to the sensor>
Disclaimer: u might get the check engine light to go on, but see the link below to fiddle/reset it
for more info in fiddling w/ that set screw to choose modes/read trouble codes,
http://www.240sx.org see FAQs section.
I'm thinking: check ALL your grounds 1st... or goto nissan online mechanic forums for this