HI
i have a very big problem.
i have a cloumn name Revenue and i have differt types of revenue in it such as A, B, C.
what i want to do is that i want to say that when the Revenue column is A then sum the tola mount and put in in a new column name A when b then again same thing.
this is my code
case when Revenue='A' then Sum(total_amt) else ' ' end as A
but it is giving me and error Error converting data type varchar to numeric.
please help
i have a very big problem.
i have a cloumn name Revenue and i have differt types of revenue in it such as A, B, C.
what i want to do is that i want to say that when the Revenue column is A then sum the tola mount and put in in a new column name A when b then again same thing.
this is my code
case when Revenue='A' then Sum(total_amt) else ' ' end as A
but it is giving me and error Error converting data type varchar to numeric.
please help
Comment