Skip to content
Advertisement

how to sum 2 record when using left join in sql server?

I have a problem when I use left join and group by running this code:

The result is:

Result is

How to change this result to:

Thanks for reading my question.

Advertisement

Answer

you need to add CASE WHEN b.CFCUSTYP = 0 THEN 'm' ELSE 'n' END in group by clause

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement