Subquery question!

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

My form captures the userID(Lan Login ID) information which identifies an
employee modifying an existing request This is obvously saved in a table.

I am doing a query that would produce a report to capture each employees
modifying the form but the problem is that the userID contains numbers and
letters e.g., X123456Z and not peoples name, this makes it difficult to
understan who is who. how will tell the query to identify that LANID belongs
to employee Susan etc

I do have an employee table that stores the employee name, the userID
information etc. The other table contains employeeID as a foreign key.

This is how my querylooks like but its missing the column with UserID:
TRANSFORM Count(nz([NoticeReasons],0)) AS Reasons
SELECT tblRqsts.PrintItime
FROM tblRqsts
GROUP BY tblRqsts.PrintItime
PIVOT tblRqsts.NoticeReasons In ("Mid West","Central","West");
 
Try this ---
TRANSFORM Count(nz([NoticeReasons],0)) AS Reasons
SELECT tblLAN_ID.NAME, tblRqsts.PrintItime
FROM tblRqsts INNER JOIN tblLAN_ID ON tblRqsts.UserID = tblLAN_ID.UserID
GROUP BY tblLAN_ID.NAME, tblRqsts.PrintItime
PIVOT tblRqsts.NoticeReasons In ("Mid West","Central","West");
 
Back
Top