I have the below select stmts but I get an error message when i try to combine them. I want to convert diag_1 varchar datatype for example 250.8 to an integer and then round down to the nearest full number eg 250.
Also the data contains values with V25 aswell as numeric. Is it possible to remove the 'V' from some of the data?
Select encounter_id,diag_1,diag_2,diag_3, Try_convert(float,[diag_1]) as [float1], Try_convert(float,[diag_2]) as [float2], Try_convert(float,[diag_3]) as [float3] from dbo.encounters;
Select round(float1,1) as roundvalue from dbo.encounters;