Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Lets say I have two tables looks like below
Table 1
| ID | Product | Amount |
| 1 | A | 100 |
| 1 | B | 200 |
Table2
| ID | Product | Amount |
| 1 | A | 300 |
| 1 | C | 250 |
Now I want to create the Final table with below condition
If ID & Product from Table1 exist in Table2 , then Take the Amount wherever it is greater, in this case it will pick from table2.
Also take ID & Product from Table2 which not there in Table1.
Final Output
| ID | Product | Amount |
| 1 | A | 300 |
| 1 | B | 200 |
| 1 | C | 250 |
I agree because right now we don't even have any idea of what is working well and what isn't. I would def. suggest running the loop script once as well.