Hi everyone,
I have 3 tables.
Employees(empid)
EmployeesCertificates(empid,certid,expirydate)
Certificates(certid)
What I'm trying to do is return all certificates for all employees, but I also want to return entries where employee's are missing certificates.
So far this is what I have but it only returns certificates that employee's have.
Code:
select EmployeeCertificates.EMPID, EmployeeCertificates.CertId,EmployeeCertificates.ExpiryDate, Certificates.CertID,Certificates.CertName
from EmployeesCertificates
left join Certificates on
EmployeeCertificates.CertId = Certificates.CertID
I imagine I'm missing something with the Employee's table maybe, not sure though. Any advice would be appreciated.
Thanks