J
JB
I HAVE 2 QUERIES FROM 2 SEPARATE TABLES
ONE HAS THE TREATMENT SALES FOR THERAPIST BY DATE
ONE HAS THE RETAIL SALES FOR THERAPIST BY DATE
I JOIN THE INFORMATION FROM BOTH QUERIES INTO ONE USING UNION QUERY. I HAVE
TRIED USING THIS BELOW:
SELECT tblTherapistInformation.TherapistID,
tblTherapistInformation.TypeOfTherapist, [LastName] & " " & [FirstName] AS
[Therapist Name], tblRetailSales.[Transaction Date], tblRetailSales.[Retail
Sales]
FROM tblTherapistInformation INNER JOIN tblRetailSales ON
tblTherapistInformation.TherapistID = tblRetailSales.EmployeeID
WHERE (((tblTherapistInformation.TypeOfTherapist)=[ENTER TYPEOFTHERAPIST])
AND ((tblRetailSales.[Transaction Date]) Between [BeginDate] And [EndDate]))
UNION ALL
SELECT tblTherapistInformation.TherapistID,
tblTherapistInformation.TypeOfTherapist, [LastName] & " " & [FirstName] AS
[Therapist Name], tblWork.[Transaction Date], tblWork.[Treatment Sales]
FROM tblTherapistInformation INNER JOIN tblWork ON
tblTherapistInformation.TherapistID = tblWork.TherapistID
WHERE (((tblTherapistInformation.TypeOfTherapist)=[ENTER TYPEOFTHERAPIST])
AND ((tblWork.[Transaction Date]) Between [BeginDate] And [EndDate]));
I ONLY GET THE INFORMATION FROM THE FIRST QUERY AND NOT THE 2ND QUERY
HELP
ONE HAS THE TREATMENT SALES FOR THERAPIST BY DATE
ONE HAS THE RETAIL SALES FOR THERAPIST BY DATE
I JOIN THE INFORMATION FROM BOTH QUERIES INTO ONE USING UNION QUERY. I HAVE
TRIED USING THIS BELOW:
SELECT tblTherapistInformation.TherapistID,
tblTherapistInformation.TypeOfTherapist, [LastName] & " " & [FirstName] AS
[Therapist Name], tblRetailSales.[Transaction Date], tblRetailSales.[Retail
Sales]
FROM tblTherapistInformation INNER JOIN tblRetailSales ON
tblTherapistInformation.TherapistID = tblRetailSales.EmployeeID
WHERE (((tblTherapistInformation.TypeOfTherapist)=[ENTER TYPEOFTHERAPIST])
AND ((tblRetailSales.[Transaction Date]) Between [BeginDate] And [EndDate]))
UNION ALL
SELECT tblTherapistInformation.TherapistID,
tblTherapistInformation.TypeOfTherapist, [LastName] & " " & [FirstName] AS
[Therapist Name], tblWork.[Transaction Date], tblWork.[Treatment Sales]
FROM tblTherapistInformation INNER JOIN tblWork ON
tblTherapistInformation.TherapistID = tblWork.TherapistID
WHERE (((tblTherapistInformation.TypeOfTherapist)=[ENTER TYPEOFTHERAPIST])
AND ((tblWork.[Transaction Date]) Between [BeginDate] And [EndDate]));
I ONLY GET THE INFORMATION FROM THE FIRST QUERY AND NOT THE 2ND QUERY
HELP