i'm not sure if NH is the same, but in MA, even clearing codes may not save you.
If you disconnect the battery, the codes will dissappear (and depending on what kind of code, it may or may not be stored in memory). However, lets say that doing that clears all codes and your code was for an emissions issue, just clearing the codes and showing up at the station won't work exactly.
Reason being, all of your monitors will be set to 'NO', which means all of the monitors have not had enough data to determine whether or not the CEL should be on. Depending on what monitor (4 or 5 different ones), they stay at 'NO' until it defined drive cycle is met. The EGR monitor might need 5 drive cycles including the coolant temp. changing by 40 degrees F.....
If the inspection guy sees the monitors not having enough data being stored, you will NOT fail the inspection, however, you will also NOT pass it. They will do the traditional sniffer test if that is met....Then the results of that test will determine whether you pass or not.
Just be sure, once you've cleared the codes, drive around town for a day or so if you have a legit emissions issue...
If you have a dumb code that you're confident the sniffer test won't catch, then reset, then go.
I'm not sure if that explains it enough....
You can search the MA website -
MA Emissions Website