SubQuery Problem



I have two queries, one based on another.
The first query is this.
And is called "QHasChecks"

SELECT tblChecksTMP.ChkTabID, tblChecksTMP.ChkPaid, tblChecksTMP.ChkServer, tblChecksTMP.ChkPrinted, tblChecksTMP.ChkDividedCheck, tblChecksTMP.ChkTypeID, tblChecksTMP.ChkCancelled
FROM tblTabs INNER JOIN tblChecksTMP ON tblTabs.TabID = tblChecksTMP.ChkTabID
WHERE (((tblChecksTMP.ChkPaid)=0) AND ((tblChecksTMP.ChkPrinted)=0) AND ((tblChecksTMP.ChkDividedCheck)=0) AND ((tblChecksTMP.ChkTypeID) Not Like 5) AND ((tblChecksTMP.ChkCancelled)=0));

The second query is this.

SELECT tblEmployees.EmployeeID, [EmpFirstName] & " " & [EmpLastName] AS SRV
FROM QHasChecks INNER JOIN tblEmployees ON QHasChecks.ChkServer=tblEmployees.EmployeeID
GROUP BY tblEmployees.EmployeeID, [EmpFirstName] & " " & [EmpLastName]
ORDER BY [EmpFirstName] & " " & [EmpLastName];

I need to replace the first querys references in the second query with SQL code, how would I do this?

Thanks
DS
.



Relevant Pages

  • Query question
    ... My question is why does the first query below take about ... where the second query takes about 5 ... FROM DistinctStoreUPC, dbo_sh_time INNER JOIN ...
    (microsoft.public.access.queries)
  • query help please
    ... I wanted to add the result of a second query to each row of a first query. ... sectionMainDefinition.sectionID INNER JOIN ...
    (microsoft.public.data.ado)
  • Re: Command button resetting a query parameter?
    ... The first query totals invoice on a daily basis: count, sum of sales and sum ... The second query will then add a count field of records, ...
    (microsoft.public.access.formscoding)
  • Re: SMS_G_System.UserName
    ... The first query won't return the expected results you are looking for sine ... you are essentially returning the same information and just calling it ... The way the data is stored in the History table each ... | inner join SMS_GH_System_COMPUTER_SYSTEM on ...
    (microsoft.public.sms.misc)
  • Re: returning partial executions to the user
    ... But before executing the second query, ... the results of the first query to the user and then do my second query ... multithreading in PHP. ... multithreading in web servers' processes doesn't usually go very ...
    (comp.lang.php)