I am trying to take a weight that is stored as grams and change it to lbs, then kg, then take height which is stored as cm and show as cm and ft all in one field. It all has to be converted to a varchar 255 field. This is what I have
FormValue=(select case di.code
when 'CombinedMeasurements' then (Select
convert (varchar,convert (float,value), 0) from CV3OrderUserData where userdatacode = 'weight'and CV3OrderuserData.OrderGuid = o.guid and CV3OrderuserData.Clientguid = o.clientguid
) + 'kg ' + (Select
convert (varchar,convert (float,value), 0) from CV3OrderUserData where userdatacode = 'weight'and CV3OrderuserData.OrderGuid = o.guid and CV3OrderuserData.Clientguid = o.clientguid
The problem is, when I place *2.2 in the second select statement I get an error converting numeric to varchar error in sql. Can someone guide me?
)
FormValue=(select case di.code
when 'CombinedMeasurements' then (Select
convert (varchar,convert (float,value), 0) from CV3OrderUserData where userdatacode = 'weight'and CV3OrderuserData.OrderGuid = o.guid and CV3OrderuserData.Clientguid = o.clientguid
) + 'kg ' + (Select
convert (varchar,convert (float,value), 0) from CV3OrderUserData where userdatacode = 'weight'and CV3OrderuserData.OrderGuid = o.guid and CV3OrderuserData.Clientguid = o.clientguid
The problem is, when I place *2.2 in the second select statement I get an error converting numeric to varchar error in sql. Can someone guide me?
)