I have 2 table that i want to join. Below is the details-
Order table
Item | Order_num | Qty |
---|---|---|
A | 123b | 3 |
A | 123c | 4 |
Cust_order table
item | cust_ord | qty |
---|---|---|
A | 12v | 2 |
A | frg4 | 4 |
A | gtd. | 1 |
Desired output based on qty on cust_order table Order number from order table get assigned to cover the qty. Order table qty is divided among order table and the order number signifies which qty is assigned to which cust order
item | cust_ord | qty | Order_num |
---|---|---|---|
A | 12v | 2 | 123b |
A | frg4 | 4 | 123c |
A | gtd. | 1 | 123b |
Any help is highly appreciated!
I am trying to rank and add the details but its not working
New contributor
Trishh B is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.