I am multiplying two columns of my view vDetalleEventoCaracteristicas
and showing it in the Total column but now I want to sum all the records of the Total column
How could I do that?
Advertisement
Answer
SELECT SUM(Total) AS Total_Sum FROM ( SELECT *,(Cantidad * valor) AS Total FROM vDetalleEventoCaracteristicas WHERE idevento = @IdEvento )table_alis
Use this query you will get sum of Total column.