I am getting the following error message when I am trying to do replace null
to zero
.
The column name "jan" specified in the PIVOT operator conflicts with the existing column name in the PIVOT argument.
Query below:
select * from(select isnull(jan,0),isnull(feb,0),sum(data) as amount )as p
pivot(
sum(amount) for month in(jan,feb)) as piv