2
Answers

Update in SQL Server

Photo of Akshay Teotia

Akshay Teotia

13y
1.2k
1
Hi Friends

I have a table have two column (id,amount) the value(1,10) .Now i want to update amount as the new updation is give sum of initial and new value.
for example : The initial value of amount is 10 and new one is 20 now i want updated value of amount is 30.

Answers (2)

0
Photo of veronica.colacci
NA 5 0 20y
Thank you Mykonian - I appreciate the explaination.
0
Photo of Mykonine
NA 520 0 20y
Semi-C programmer here. Hopefully you did accidentally come back... To hardcode this, I would define the conversion factors using preprocessor directives. Use a Switch statement to choose between the conversion factors.
0
Photo of veronica.colacci
NA 5 0 20y
Sorry - did not know I was in the wrong forum. I am not asking for someone to do it - I was asking for help in understanding it, but that's okay - I will look for understanding elsewhere. Thank you for your response - I appreciate it.
0
Photo of james
NA 1.1k 313k 20y
Okay, two things my dear.... #1... you're in a forum for the WRONG language, this is a C# forum, not a C forum. #2... we don't help people with their homework here. Read your textbook and I'm sure you will figure this out on your own. -James