Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
tamancha.1
Starting Member
37 Posts |
Posted - 2010-09-23 : 11:49:19
|
select activity_type, activity_sub_type, sum(revenue)from #activity_v3group by activity_type, activity_sub_typeSince revenue is varchar in my database, how do I convert it to numeric to calculate the sum?I am getting the following error right now:Msg 8117, Level 16, State 1, Line 1Operand data type varchar is invalid for sum operator. |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-09-23 : 13:07:50
|
why do you have revenue as varchar field?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|