Сумму, если это значение типа varchar
Sum if is value varchar...sum, iff is null to be 0
Ошибка есть
Msg 174, Level 15, State 1, Line 1 The replace function requires 3 argument(s). Msg 156, Level 15, State 1, Line 2 Incorrect syntax near the keyword 'as'.
СУБД MS SQL
Что я уже пробовал:
select dobavljac as 'Dobavljac', SUM(isnull(cast(REPLACE(CONVERT(varchar,CONVERT(float,iznos_sa_pdv),1)), '#,0.00',''),0) AS UKUPNO) from (select dobavljac, iznos_sa_pdv from ulazni_racun_roba_lista union all select poslovni_partner, iznos_sa_pdv from mp_ulazni_racun_ostalo_lista) as alltables group by dobavljac