Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

adding new sum of money to previously added money value and storing it as single

$
0
0

i have a table like this

--ID------ TYPE----------AMOUNT

154------- normal-----------1000

168------- good--------------2000

205------- best--------------5000

Now if user re-enters record of same ID and of same TYPE then new sum of money should be added to previous one..

Like if ID=154,, Type=Normal,, and amount= 200

then above data should be updated as 

--ID------ TYPE----------AMOUNT

154------- normal-----------1200 < (changed from 1000 to 1200)>

168------- good--------------2000

205------- best--------------5000

Please suggest me the method


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>