Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
IDCard or not
Message
From
31/01/2013 12:06:00
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
IDCard or not
Miscellaneous
Thread ID:
01564852
Message ID:
01564852
Views:
54
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,
Next
Reply
Map
View

Click here to load this message in the networking platform