I have table with column Percentage varchar(10)
Data in that table is
Pecentage
2/10
4/10
6/10
..............
Now I have to convert above percentage to decimal,so now i am doing like this.
select CAST(percentage as decimal) from TabName
I am getting following exception
Error converting data type varchar to numeric.
I would like to get the results like 0.2,0.4,0.6
You cannot convert that varchar format(2/10) to float .You need to get the individual string and then perform the division
Result