SubQuery Problem
- From: DS <bootybox@xxxxxxxxxxxxx>
- Date: Sun, 18 Nov 2007 10:55:54 -0500
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
.
- Follow-Ups:
- Re: SubQuery Problem
- From: Michael Gramelspacher
- Re: SubQuery Problem
- Prev by Date: Re: Running a query to identify clashes
- Next by Date: Re: Running a query to identify clashes
- Previous by thread: Re: variable query
- Next by thread: Re: SubQuery Problem
- Index(es):
Relevant Pages
|