>I have student .dbf with fields 1.Regno (C) 2.Name (C) 3.DOB (D) 4.Category (C) 5. Result (C) 6.Sitting (Integer) 7.Course (C) having around 2000 records. I would like to write a "Error.prg" for four types of Error list mention below.
>
>1. List out the student whose age above 25 years as on 1st July 2011 based on DOB Field.
select * from Student where DOB < gomonth(date(),-12*25)
>
>2. List out the student whose age above 17 years as on 1st December 2011 based on DOB Field.
select * from Student where DOB > gomonth(date(),-12*17) && students less than 17 years old
>
>3. List out the failed student based on Result filed. The result field having two types of value 1."Y" 2."N" if Y means "Pass" and if "N" means "Fail".
>
>4.List out Sitting filed value equal to "3".
>
>How to write?
3 & 4 please try yourself using appropriate WHERE clause in a query.
If it's not broken, fix it until it is.
My Blog