PavelSimek
New Member
- Joined
- Jul 28, 2024
- Messages
- 2
- Office Version
- 365
- Platform
- Windows
Please help... In Invoices table record in my "Excel database" i keep supplier ID and customer ID when I list all invoices for a certain period i need names instead of IDs. With one INNER JOIN (for only one "BusinessPartner") the query works, as soon as I use two it reports an error.
SELECT
Invoices.ID,
Supplier.BusinessPartnerName AS SupplierName,
Customer.BusinessPartnerName AS CustomerName,
Invoices.VS,
Invoices.Total
FROM
[Invoices$] as Invoices
INNER JOIN
[BusinessPartners$] AS Supplier ON Invoices.SuppID = Supplier.ID;
INNER JOIN
[BusinessPartners$] AS Customer ON Invoices.CustID = Customer.ID
WHERE
Invoices.DueDateUS >= #06/24/2024# AND Invoices.DueDateUS <= #07/24/2024# AND (Invoices.AlreadyPayed = 'FALSE' OR Invoices.NotPayed = 'FALSE') ORDER BY Invoices.DueDateUS DESC
Thank you in advance,
Pavel
SELECT
Invoices.ID,
Supplier.BusinessPartnerName AS SupplierName,
Customer.BusinessPartnerName AS CustomerName,
Invoices.VS,
Invoices.Total
FROM
[Invoices$] as Invoices
INNER JOIN
[BusinessPartners$] AS Supplier ON Invoices.SuppID = Supplier.ID;
INNER JOIN
[BusinessPartners$] AS Customer ON Invoices.CustID = Customer.ID
WHERE
Invoices.DueDateUS >= #06/24/2024# AND Invoices.DueDateUS <= #07/24/2024# AND (Invoices.AlreadyPayed = 'FALSE' OR Invoices.NotPayed = 'FALSE') ORDER BY Invoices.DueDateUS DESC
Thank you in advance,
Pavel