Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select records, if repeat three time
Message
De
18/10/2008 05:58:19
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
Visual FoxPro
Divers
Thread ID:
01355704
Message ID:
01355711
Vues:
15
>Hi all, I want to select the records If result"Fail" is repeated 3 time .
>thanks
>SELECT * FROM examtran WHERE code="001724" AND year=2008 AND result="Fail" GROUP BY nmonth,result

Your question is not clear, Fail 3 times per Code? Or Fail 3 times per code, year? Anyway assuming per Code.
SELECT * FROM examtran WHERE code in ;
 (SELECT code FROM examtran where result=="Fail" having count(*) >= 3  GROUP BY code)
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform