How to add to the number%, there is a query for example:

Select Concat(a.Retention,'%') From Applications a 

type a.Retention - float
I get the error:

 **Error converting data type varchar to float.** 

Ie expect this result:

 20% 15% 

instead of 20, 15

  • 2
    And as you can add to the number '%'. There is no such operation in mathematics, you probably need to first convert a number into a string (see cast, convert) - Mike
  • @Mike, tried so Concat (cast (a.Retention as nvarchar (50)), '%') the same error - Zhandos
  • one
    So you have a mistake somewhere else. Have you shown the entire request? it's just very strange that it tries to reverse varchar to float - Mike
  • 2
    And yes, I tried select concat(cast(1.33 as float),'%') it does not cause an error ... - Mike
  • @Mike, yes you are right in the Retention column there were entries with null, fixed Concat (cast (Isnull (Retention, '') as float), '%') - Zhandos

0