We investigate the molecular sensing properties of carbon nanotube-boron nitride-carbon nanotube (CNT-BN-CNT) junctions. We demonstrate that the electrical conductance of such a junction changes in response to the binding of an analyte molecule to the region of BN. The change in conductance depends on the length of the BN spacer and the position of the analyte and therefore we propose a method of statistically analysing conductance data. We demonstrate the ability to discriminate between analytes, by computing the conductance changes due to three analytes (benzene, thiol-capped oligoyne and a pyridyl-capped oligoyne) binding to junctions with five different lengths of BN spacer.