Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
IDCard or not
Message
De
31/01/2013 12:06:00
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
IDCard or not
Divers
Thread ID:
01564852
Message ID:
01564852
Vues:
53
Hi,

I have 2 tables:

Employee table 2 fields:

EmpID EmpName
11111 JoeBlo
22222 JackWhite
33333 JohnBlack
44444 MaryGreen
55555 MeeLee
66666 SeeLoo
77777 TeeNoo


Idcard table 2 fields:

EmpID ExpireDate
11111 01/31/2013
22222 02/28/2013
33333 03/31/2013
44444 04/30/2013
55555 12/31/2012

Find all employees either without an IDcard or with one that has expired ?

SELECT * FROM Employee WHERE EmpID not IN(SELECT IDCard.EmpID FROM IdCard);

How do I do to have with one that has expired like empID = 55555

Thank you,
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform