>I have the following SPT that seems to return records that do not match. One record in particular has an inspectdt of 04/29/2008
>
>
>testconnString = "Select Distinct LEFT(vndnr,5) As rCount From amflib7.vennam" +;
>" Join webprddt7.qaismast On webprddt7.qaismast.vendorcode = amflib7.vennam.vndnr" +;
>" Join webprddt7.qaisitem On webprddt7.qaisitem.isindex = webprddt7.qaismast.recseq" +;
>" Where inspectdt >= '10/01/2009' And inspectdt <= '10/31/2009'" +;
>" And amflib7.vennam.posus <> 'S' And amflib7.vennam.entps = '1' Order By LEFT(vndnr,5)"
>
>
Try using ISO dates
'20091001' and '20091031'
If it's not broken, fix it until it is.
My Blog