TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Goran Bibic
482
2.9k
197.8k
Sum if is value varchar
May 26 2018 6:19 AM
Sum if is value varchar...sum, iff is null to be 0
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
error is
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'.
Reply
Answers (
2
)
data dictionary in database
Sum column from multiple tables and diff sql