i just tried this as a test:select ARRESTNO, ECSOIDfrom ALLWARRANTSERRORCHECK awhere exists(select ARRESTNO, ECSOID from ALLWARRANTSERRORCHECK as b where Substring(b.arrestno,10,15) = Substring(a.ECSOID,10,15))
but that is pulling backARRESTNO ECSOIDGCSO00ARR053136 GCSO00MNI031196GCSO00ARR053136 GCSO00MNI031196GCSO00ARR031111 GCSO00MNI019995GCSO00ARR012605 GCSO00MNI009332GCSO00ARR013023 GCSO00MNI009332GCSO00ARR013333 GCSO00MNI009332GCSO00ARR031007 GCSO00MNI019946GCSO00ARR017357 GCSO00MNI012047GCSO00ARR052020 GCSO00MNI022329GCSO00ARR032149 GCSO00MNI020567GCSO00ARR041004 GCSO00MNI025495GCSO00ARR015992 GCSO00MNI009826GCSO00ARR018728 GCSO00MNI009826GCSO00ARR029175 GCSO00MNI018962
Clearly these are not matching left to right and the resultset totals 2373 rows. Whereas running the following:select ARRESTNO, ECSOIDfrom ALLWARRANTSERRORCHECK awhere exists(select ARRESTNO, ECSOID from ALLWARRANTSERRORCHECK as b where b.arrestno = a.arrestno and b.ecsoid <> a.ecsoid) order by arrestno
is producing the following:ARRESTNO ECSOIDGCSO00ARR001038 GCSO00MNI001038GCSO00ARR001038 GCSO00MNI000971GCSO00ARR001038 GCSO00MNI000971GCSO00ARR002808 GCSO00MNI012401GCSO00ARR002808 GCSO00MNI002376GCSO00ARR002808 GCSO00MNI002376GCSO00ARR003239 GCSO00MNI002718GCSO00ARR003239 GCSO00MNI003239GCSO00ARR003717 GCSO00MNI003717GCSO00ARR003717 GCSO00MNI022671
with 349 total results in the resultset.i'm confused.