>I have a table namely "student.dbf" having fields 1. Regno (I), 2. Name (C), Caste (C), 4. DOB (Date), 5. Maths (I), 6. Physics (I), 7. Biology(I).
>
> I want to select the records based on DOB field, whose student age is less than 17 years as on 1st December 2014 and whose student age is less than 17 years as on 1st October 2014 and whose student age is greater that 28 year as on 1st July 2014.
>
> How to write the Query?
First, your statement is unclear, since you specify two different dates for when the student should be less than 17 years; I'll pick one of them to work with.
dAge17Cutoff = DATE(2014, 12, 1)
dAge28Cutoff = DATE(2014, 7, 1)
SELECT * ;
FROM Student ;
WHERE dAge17Cutoff - DOB < 17 ;
OR dAge28Cutoff - DOB > 28 ;
INTO CURSOR csrOutliers
Tamar