Hi,
How can i make query for this:
Table1
Column1 Column2
LS11111 0
LS22222 100
LS33333 10
LS44444 0
LS55555 25
Table2
Column1 Column3
LS11111 100
LS22222 80
LS33333 25
Result i need is
Column1 Column2
LS11111 100
LS22222 100
LS33333 25
LS44444 0
LS55555 25
Column1 is same on both tables,
Column2 is pieces number in table1, and column3 is pieces number in Table2
I need maximum piece numbers.
If table2 doesnt exist column1 value then shows table1 column2, and if it exist and is larger than table1 column2 then shows number from table2