Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Filter record
Message
De
03/04/2015 08:41:22
 
 
À
03/04/2015 06:38:30
Muthu Vel
Sty Company
Inde
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows 7
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01617745
Message ID:
01617761
Vues:
38
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform