Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error list code
Message
 
 
To
12/07/2011 20:38:28
Muthu Vel
Sty Company
India
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01518027
Message ID:
01518028
Views:
42
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform