I am trying to do the following:
select @revenue = '$' + cast(sum(amount) as varchar)
from revenue
where reportId = @reportId
But I am getting the error:
Syntax error converting the varchar value ‘$9.83314e+006’ to a column
of data type int.
What am I doing wrong?
Your variable
@revenuemust be defined as anint– yes?