Is it possible to concatenate after using a Math equation?
I have a simple calculation running like so
Value / 100 * 0.5 + Value as Total Value
example would be 3000 / 100 * 0.50 = 3015.
But I would like to include a star with it.
I.e.
Value / 100 * 0.5 + Value + ' *' as Total Value
to display as 3015 *
However I’m getting an error saying
Error converting data type varchar to numeric.
Is here a way around this? Would it be possible to then convert the total value to a varchar and concatenate the star?
You cannot just concatenate together numerical and string values – so you need to do:
First determine your result from your computation, then cast it to a
varcharlarge enough to hold the result, and concatenate that casted string with the star string literal.