FreeriderUK
Well-known member
I have 3 tables: tbCategory, tbCustomers & tbInvoices.
I want to show in a DataGridView, a list of the invoices in a particular category, including the Customer Name.
The related tables are:
tbCategory:
CategoryID
CategoryDescription
tbCustomers:
CustomerID
CustCategoryID
CustomerName
tbInvoices:
InvoiceID
InvCustomerID
InvoiceNumber
Put simply, I want to list all invoices related to all the customers in the selected Category
What is the SELECT statement I should use to fill the DataSet?
I want to show in a DataGridView, a list of the invoices in a particular category, including the Customer Name.
VB.NET:
InvoiceNumber CustomerName CategoryDescription
--------------------------------------------------
123456789012 Mr Jones Cleaning
123456789013 Mr Smith Cleaning
.
.
123456789099 Mrs Green Cleaning
The related tables are:
tbCategory:
CategoryID
CategoryDescription
tbCustomers:
CustomerID
CustCategoryID
CustomerName
tbInvoices:
InvoiceID
InvCustomerID
InvoiceNumber
Put simply, I want to list all invoices related to all the customers in the selected Category
What is the SELECT statement I should use to fill the DataSet?