Click here to Skip to main content
15,886,689 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I have 2 tables
1.Registration Master
2.Attendance Master

Registration_Master data is as
Official_Email,EmpName,desg
wasif@apv.com ,Mohd Wasif ,Engineer
peter@apv.com ,Peter,Engineer
James@apv.com,james ,Engineer

and
Attendance_Master
consist of
Official_Email,LoginTime
wasif@apv.com ,2011-01-13 17:25:27.267
wasif@apv.com ,2011-01-01 17:25:27.267
peter@apv.com,2011-01-01 17:25:27.267

in this
select * from Attendance_Master where LoginTime=getdate()
it is giving me

wasif@apv.com ,2011-01-13 17:25:27.267

now my requirement is that I want to retrieve all details
from Registration_Master who don't have record in Attendance_Master
in today's date. that is

VB
peter@apv.com ,Peter,Engineer
James@apv.com,james ,Engineer


Please let me know how to do it?
Thanking You
Mohammad Wasif
Posted

1 solution

Something like this :
select * from Registration_Master where Official_Email NOT IN (select Official_Email from Attendance_Master where Official_Email = Registration_Master.Official_Email);


Cheers
 
Share this answer
 
Comments
fjdiewornncalwe 13-Jan-11 10:29am    
We really shouldn't give the OP the answer without them showing us what they attempted first. They won't really learn anything if we just hand it to them.
That being said, your answer is valid so you still get the +5.
Estys 13-Jan-11 10:36am    
@marcus kramer : I know, but I don't always want to impose edifying words on the OP :)
Besides that, it's not complete.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900