Hello friends I want to make a sum of a series of elements that "cast" to decimal , this is what I am trying to do. But he says
Incorrect syntax near 'sum'.
select sum( SELECT CAST(em.sueldoDiario AS DECIMAL(18, 4)) )
from
sysCPPuestos p
inner join sysCPCentroCosto cc
on cc.idSysCPEmpresas = p.idSysCPEmpresas
inner join sysCPEmpleados em
on em.idSysCPEmpresas = p.idSysCPEmpresas
where p.idSysCPEmpresas = 1