D
derekjansen
Hi All,
I am fairly certain this is a really basic question, but I'm having a
tough time figuring out how to make this work.
The first statement is a union query to include the master list of
employees with the "extra" list for employees who sometimes go by
nicknames or might have names that people frequently spell wrong:
(query name: allStaff)
SELECT [Employee Id] AS EmployeeID, [Person ID] AS PersonID, [First
Name] AS First, Initial, [Last Name] AS Last, [Work Email] AS Email,
[Department] AS Team, [Job title] AS Position, [Employee Status Type]
AS Status FROM staff
UNION
SELECT [EmployeeID], PersonID, First, Initial, Last, ExtraEmail AS
Email, Team, Position, Status FROM staffExtras
ORDER BY EmployeeID;
The second statement is a basic select query that uses the query above
called allStaff and information stored in a table called
cmFeedbackReferences. The purpose is to match up the people identified
as references from our candidates (the data in cmFeedbackReferences)
with the actual data in allStaff:
(query name: cmStaffFeedbackReference1)
SELECT cmFeedbackReferences.PersonID, cmFeedbackReferences.[Primary e-
mail address], cmFeedbackReferences.[Reference name 1],
cmFeedbackReferences.[Relation to applicant 1], cmFeedbackReferences.
[Reference e-mail 1], allStaff.EmployeeID
FROM cmFeedbackReferences LEFT JOIN allStaff ON cmFeedbackReferences.
[Primary e-mail address] = allStaff.Email
WHERE (((IIf(InStr(1,[Reference e-mail 1],"@teachforamerica",2)
The problem is in second query, cmStaffFeedbackReference1 is not
showing the EmployeeID (or any other data from allStaff. Any ideas? Is
there something I'm doing here that just doesn't make sense? Thanks!
Derek
I am fairly certain this is a really basic question, but I'm having a
tough time figuring out how to make this work.
The first statement is a union query to include the master list of
employees with the "extra" list for employees who sometimes go by
nicknames or might have names that people frequently spell wrong:
(query name: allStaff)
SELECT [Employee Id] AS EmployeeID, [Person ID] AS PersonID, [First
Name] AS First, Initial, [Last Name] AS Last, [Work Email] AS Email,
[Department] AS Team, [Job title] AS Position, [Employee Status Type]
AS Status FROM staff
UNION
SELECT [EmployeeID], PersonID, First, Initial, Last, ExtraEmail AS
Email, Team, Position, Status FROM staffExtras
ORDER BY EmployeeID;
The second statement is a basic select query that uses the query above
called allStaff and information stored in a table called
cmFeedbackReferences. The purpose is to match up the people identified
as references from our candidates (the data in cmFeedbackReferences)
with the actual data in allStaff:
(query name: cmStaffFeedbackReference1)
SELECT cmFeedbackReferences.PersonID, cmFeedbackReferences.[Primary e-
mail address], cmFeedbackReferences.[Reference name 1],
cmFeedbackReferences.[Relation to applicant 1], cmFeedbackReferences.
[Reference e-mail 1], allStaff.EmployeeID
FROM cmFeedbackReferences LEFT JOIN allStaff ON cmFeedbackReferences.
[Primary e-mail address] = allStaff.Email
WHERE (((IIf(InStr(1,[Reference e-mail 1],"@teachforamerica",2)
0,"Yes","No"))="Yes"));
The problem is in second query, cmStaffFeedbackReference1 is not
showing the EmployeeID (or any other data from allStaff. Any ideas? Is
there something I'm doing here that just doesn't make sense? Thanks!
Derek