1997 altima knock sensor

I'm getting a knock sensor code when scanning. No other codes and the car runs fine. I found the location of the part but I don't think I'll be
able to remove it without major work that I don't want to get into at the present time. If I just connect a new sensor without installing it would it clear the trouble code. I know its half-assed but it would get me some time. Thanks.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
Add image file

Motorsforum.com is a website by car enthusiasts for car enthusiasts. It is not affiliated with any of the car or spare part manufacturers or car dealers discussed here. All logos and trade names are the property of their respective owners.