Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Eligible candidate
Message
 
 
To
04/08/2012 20:36:27
Muthu Vel
Sty Company
India
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01549971
Message ID:
01549972
Views:
67
>I have table "merit.dbf" having fields 1. Regno 2. Applno 3. Category 4. dob 5. Physics 6. chemistry 7. Biology.
> I want to select the record whose students age >= 17 years as on 31.12.2009.(These students are eligible for courses like M.B.B.S, BDS,B.V.Sc, BAMS, AND B.Sc(NURSING)). The sample data image is send herewith for reference. Awaiting yours valuable reply.

Before dealing with the specific SQL command the first thing you need to do is normalize the data.

First you need a table of applicants. If you know Applno is unique you can use that. Otherwise use an autogenerated sequential primary key.

You probably also need a Registration table, with a relation to Applicants. I imagine some applicants apply more than once so be sure to capture the details of each.

You need another table for test scores. Again it should have a child key to the applicant. Do not wire it to biology, physics, and chemistry. Make it generic, just a test score associated with a test and a registered applicant.

To keep it clean you should have a reference table of tests.

The Select statement will fall into place once you have those things straightened out.

A field called Caste, hmmm.
Previous
Reply
Map
View

Click here to load this message in the networking platform