Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
my todays challenge:
3 tables
Table 1 | |
Order Number | Qty |
1510001 | 2 |
1510002 | 3 |
1510003 | 1 |
1510004 | 4 |
1510005 | 5 |
1510006 | 2 |
1510007 | 8 |
1510008 | 2 |
1510009 | 1 |
Table 2 | ||
Delivery Number | Predecessor | Predecessor Table |
1520001 | 1510001 | 1 |
1520002 | 1510003 | 1 |
1520003 | 1510002 | 1 |
1520004 | ||
1520005 | 1510004 | 1 |
1520006 | ||
1520007 | 1510005 | 1 |
1520008 | 1510006 | 1 |
Table 3 | ||
Invoice Number | Predecessor | Predecessor Table |
1530001 | 1520001 | 2 |
1530002 | 1520003 | 2 |
1530003 | 1520002 | 2 |
1530004 | 1520005 | 2 |
1530005 | 1510007 | 1 |
1530006 | 1510009 | 1 |
My Invoice table does not contain always an ordernumber. It contains the reference to the document that triggers the invoice and the reference from which table that trigger document originates. The trigger is either a delivery document, or the order document itself.
how to connect ordernumber to the invoicenumber. the result in the end needs to give me all orders and all invoices
thank you for your help
Hi Hans,
Not sure what you mean. All orders and deliveries and invoices are there. If there is no invoice, there is no invoice.
/Johan
Hi Johan,
You are correct, I did not look in the correct place. This is a solution that works.
t.u.
krgds
Hans !