Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I don't seem to get it.

Status
Not open for further replies.

BakMan

Vendor
Jan 19, 2006
1
GB
The idea is : people need to check their passwords every <password_exiry>

I have 3 tables

1 table containing 3 fields ; hostID, hostname, password_expiry
1 table containing the users ; userID, username, password
1 table containing the last date the password was checked : checkedID, userID , hostID, last_date_checked

How can I build a query which is going to tell me when a host was never checked before ?


BaKMaN
 
If rows are only added to the password_checked_table when a password is checked then -
Code:
SELECT * FROM hosts_table
WHERE hostID NOT IN (
   SELECT DISTINCT hostID FROM password_checked_table)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top