Sum of particular columns together from 1 row and update field in this record (Total
Question
Application Type
Reactive

Hello

I have table that I need to add up (sum) of columns and update the row with the total .


In the row.. I want to select Question1, Question2, Question3  ... to Question16 and add all those together (SUM) and update field "Correct" with the results.


Note (Question1-Question16) is an integer.  and "Correct" is also an Integer


Can you help me create this?


Thanks in Advance!!

Champion
Solution

Hi Dan,

You can't use sum, But you can create SQL like below.

UPDATE  {GreadedForms} SET {GreadedForms}.[Correct] = {GreadedForms}.[Question1]  +  {GreadedForms}.[Question2]  + ... + [Question16] 

Kind Regards,

Hello


That is good.. but this is not working yet.. I know I am missing something.


I have a input on ID as I will run this action with a loop to be able to do each row


Can you see anything else that I am missing  (for now I am just adding question1 and question2 for simplistic)



Got it... this is what works... Thanks for pointing me in the right direction


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.