Hi Guys,
I have been struggling with this for a few hours. It seems like this should be a simple query but it's not. I have three tables:
Invoices Table
id cusotmerid
30 1
40 2
Customers Table
id customername
1 Customer #1
2 Customer #2
and InvoiceCharges Table
id invoiceid unitprice quantity linetotal
1 30 30 1 30
2 30 21 3 63
3 40 3.5 1 3.5
I need to return a result set with each invoice id, the customers name, and the invoice total ie
30, Customer #1, 93
40, Customer #2, 3.5
Any help would be appreciated.
I have been struggling with this for a few hours. It seems like this should be a simple query but it's not. I have three tables:
Invoices Table
id cusotmerid
30 1
40 2
Customers Table
id customername
1 Customer #1
2 Customer #2
and InvoiceCharges Table
id invoiceid unitprice quantity linetotal
1 30 30 1 30
2 30 21 3 63
3 40 3.5 1 3.5
I need to return a result set with each invoice id, the customers name, and the invoice total ie
30, Customer #1, 93
40, Customer #2, 3.5
Any help would be appreciated.