>SELECT * FROM schedule WHERE DTOC(beg_date) > '01/01/2001'.
>This is giving me all the records from the table (25226)
>
>SELECT * FROM schedule WHERE YEAR(beg_date) > 2001
>This is giving me the correct number of records (2080)
>
>Both are valid queries. Correct ?
>What did I do to make the DTOC query not work anymore ?
>Am I going crazy ?
>
>Thanks, Ken
because you are doing a character comparison
eg
? '02/01/1900' > '01/01/2001'
= .T.
Try comparing as dates using CTOD() instead
SELECT * FROM schedule WHERE beg_date > CTOD('01/01/2001')