Well, you've made a big mistake in your database design, so you've made the code to answer this one really really tough.
Are you amenable to changing the DB design??
I'd suggest *something* like this:
Code:
Table: Employees
empid autonumber, primary key
empname ...
... other fields ...
Table: Certifications
certid autonumber, primary key
certname text
Table: EmployeeCertifications
empid int, foreign key to Employees table
certid int, foreign key to Certifications table
expirationDate datetime
So example:
Employees
1 John
2 Mary
Certifications
1 EMT
2 CPR
3 ACLS
4 PALS
... etc. ...
EmployeeCertifications
1 1 17 Oct 2008 (John's EMT cert)
1 3 21 Dec 2008 (John's ACLS cert)
2 1 14 Feb 2009 (Mary's EMT cert)
... etc. ...
*NOW* it's easy to create a query to answer your question, getting *ALL* certifications for *ALL* employees that expire at any point in time (e.g., within 90 days).
Code:
SELECT E.name, C.certname, EC.expirationDate
FROM Employees AS E, Certifications AS C, EmployeeCertifications AS EC
WHERE E.empid = EC.empid
AND EC.certid = C.certid
AND EC.expirationDate < ( Date() + 90 )
ORDER BY E.name, C.expirationDate
***********
In order to do the same thing with your current design, you would have to have a *SEPARATE* WHERE condition for *EACH* certificate type *AND* you'd have to do some MAJOR messing around to make the report show only the ones expiring in 90 days. Probably what you'd end up with is a UNION of *ONE SEPARATE QUERY* for each certification type. Ugly, slow, and just bad DB design.