I have two tables: Invoice
id number date client end client city vracht
1 4271 2014-5-28 ALLIN STIHO ZWOLLE 0
and Materials
.
id number material thickness length width amount price
1 14271 Ocoume 10 2500 1220 150 2,3
2 14271 Ocoume 15 2500 1220 60 2,3
3 14271 Ocoume 18 2500 1220 125 2,3
4 14271 Ocoume 22 2500 1220 44 2,3
5 14271 Ocoume 40 2150 1000 72 2,3
6 14271 Ocoume 18 3100 1530 25 2,3
In the Invoice
table are the invoices. In the Materials
table are the materials that belong to the invoices.
What I want is to combine those, which have the same invoice number (number column in the table), with a select-query, like this:
number date client end client city vracht material thickness length width amount price
14271 2014-5-28 ALLIN STIHO ZWOLLE 0 Ocoume 10 2500 1220 150 2,3
14271 2014-5-28 ALLIN STIHO ZWOLLE 0 Ocoume 15 2500 1220 60 2,3
14271 2014-5-28 ALLIN STIHO ZWOLLE 0 Ocoume 18 2500 1220 125 2,3
14271 2014-5-28 ALLIN STIHO ZWOLLE 0 Ocoume 22 2500 1220 44 2,3
14271 2014-5-28 ALLIN STIHO ZWOLLE 0 Ocoume 40 2150 1000 72 2,3
14271 2014-5-28 ALLIN STIHO ZWOLLE 0 Ocoume 18 3100 1530 25 2,3
How would this query look?