In the system you have a% variable of% that should receive the total value of the sum of the Values column.
How can I assign the sum value vsoma ?
vsoma
Use the INTO clause:
Example:
SELECT sum(COLUNA) INTO VARIAVEL from TABELA
The result of the sum will be assigned in the variable you declared.
More information: