Jeg antager, at din WDATE er en varchar / char og ikke datatime, som den burde være, du kan caste den sådan her, men jeg anbefaler, at du ændrer datatypen til datetime. Prøv dette:
SELECT W.NUMBER,B.NAME,Br.NAME,W.WDATE,W.REPAIRSTATUS,W.REPAIRCOST,W.REMARK
FROM Work_Order AS W,Brands AS B,Branches AS Br
WHERE W.BRANDID = B.ID AND W.BRANCHID = Br.ID
AND CONVERT( DATETIME, WDATE, 101) < CONVERT( DATETIME, '09/18/2012', 101)
Prøv denne kode, den burde finde de fleste af de ugyldige datoer
SELECT WDATE, W.NUMBER,B.NAME,Br.NAME,W.WDATE,W.REPAIRSTATUS,W.REPAIRCOST,W.REMARK
FROM Work_Order AS W,Brands AS B,Branches AS Br
WHERE W.BRANDID = B.ID AND W.BRANCHID = Br.ID
AND WDATE not like '[0-1][0-9]/[0-3][0-9]/20[0-1][0-9]'