Hi! I am creating a report based on a query - here is the SQL so far: Note: [Docket #] = [PRNumber] (same number)
SELECT [Project Expenses Table].[Docket #], [Project Expenses Table].[Invoice ID], [Project Expenses Table].[Invoice Date], [Project Expenses Table].[Invoice Amount], [Project Expenses Table].[Description of Invoice], tblPPOScript.MemoTo, tblPPOScript.FromNames, tblPPOScript.AirDate, tblPPOScript.OutageDatePlace, tblPPOScript.OutageNecessary, tblPPOScript.PRNumber
FROM [Project Expenses Table] INNER JOIN tblPPOScript ON [Project Expenses Table].[Docket #] = tblPPOScript.PRNumber
WHERE ((([Project Expenses Table].[Invoice ID])>"0"));
I think the easiest way to explain my problem is to give you an example. Docket #3298 has two invoices entered so far in the Project Expenses Table. A separate table, tblPPOScript.PRNumber, has eight matching dockets - the remaining six PRNumbers have not been invoiced yet. How do I select only the two invoiced dockets, but include the corresponding information in the SQL from tblPPOScript? I tried inner join but it still gives me all records. I hope that makes sense. Thanks in advance.
SELECT [Project Expenses Table].[Docket #], [Project Expenses Table].[Invoice ID], [Project Expenses Table].[Invoice Date], [Project Expenses Table].[Invoice Amount], [Project Expenses Table].[Description of Invoice], tblPPOScript.MemoTo, tblPPOScript.FromNames, tblPPOScript.AirDate, tblPPOScript.OutageDatePlace, tblPPOScript.OutageNecessary, tblPPOScript.PRNumber
FROM [Project Expenses Table] INNER JOIN tblPPOScript ON [Project Expenses Table].[Docket #] = tblPPOScript.PRNumber
WHERE ((([Project Expenses Table].[Invoice ID])>"0"));
I think the easiest way to explain my problem is to give you an example. Docket #3298 has two invoices entered so far in the Project Expenses Table. A separate table, tblPPOScript.PRNumber, has eight matching dockets - the remaining six PRNumbers have not been invoiced yet. How do I select only the two invoiced dockets, but include the corresponding information in the SQL from tblPPOScript? I tried inner join but it still gives me all records. I hope that makes sense. Thanks in advance.