Inventory Table
| ID | Date | Product name | Unit | Qty |
| 1 | 10/10/2017 | cello | pic | 50 |
| 2 | 10/10/2017 | notebook | pic | 30 |
| 3 | 5/10/2017 | Rice | kg | 50 |
| 4 | 5/10/2017 | Bottel | Litter | 30 |
| 5 | 5/10/2017 | notebook | pic | 80 |
| 6 | 5/10/2017 | cello | pic | 40 |
Item in Stock
| ID | Date | Product name | unit | totalQty | totalSold | StockInHand |
| 1 | 10/10/2017 | cello | pic | 90 | 50 | 40 |
| 2 | 10/10/2017 | notebook | pic | 110 | 10 | 100 |
| 3 | 5/10/2017 | Rice | kg | 50 | 0 | 50 |
| 4 | 5/10/2017 | Bottel | Litter | 30 | 10 | 20 |
How to add two same name item like cello (50+40=90) and notebook (30+80=110)
sum(cast(inv.QTY as numeric(18,2)))+isnull(sum(cast(inv.QTY as numeric(18,2))),0) as totalQty

Rafnas T PPosted Sep 5, 2017, 2:21 AM
Ramesh PalanivelPosted Sep 5, 2017, 2:13 AM
Jyoti JodhaPosted Sep 5, 2017, 2:10 AM
Rafnas T PPosted Sep 5, 2017, 2:06 AM
Rafnas T PPosted Sep 5, 2017, 2:05 AM
Ravi SangtaniPosted Sep 5, 2017, 1:11 AM
Ramesh PalanivelPosted Sep 5, 2017, 12:48 AM
Jyoti JodhaPosted Sep 5, 2017, 12:46 AM
Ramesh PalanivelPosted Sep 5, 2017, 12:38 AM