Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Update ?

Author  Topic 

oguzkaygun
Yak Posting Veteran

53 Posts

Posted - 2012-03-10 : 09:34:37
Hi

Price PriceofKind Date

100 B 01.01.2000

200 A 01.01.2000

300 B 01.01.2000

700 A 01.01.2000

If i add 500 as price and price of kind is B, data should be like below.
600 B //100 B + 500 B= 600 B

300 B //200 A + 500 B = 300 B

800 B // 300 B + 500 B = 800 B

200 A //700 A + 500 B = 200 A

Then if i add 400 as price and A as kind of price, it should be like below.

200 B //600 B + 400 A = 200 B

100 A // 300 B + 400 A = 100 A

400 B //800 B + 400 A = 400 B

600 A // 200 A + 400 A = 600 A

How can i do that ? with Update ?
Sincerely.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-03-10 : 13:44:21
can you explain that addition logic? your results are not making much sense to me

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -