1 Read about normalization2 Split the values for columns and variable value and compare3 Another method, Try the belowdeclare @val1 varchar(100), @val2 varchar(100)select @val1='2.2020 30 4.00000',@val2='2.20200 30 4.0' select case when substring(val1,1,len(val1)-patindex('%[^1-9]%',reverse(val1))+2) = substring(val2,1,len(val2)-patindex('%[^1-9]%',reverse(val2))+2) then 'equal' else 'not equal' end from ( select replace(replace(rtrim(replace(replace(@val1,' ','^'),'0',' ')),' ',''),'^',' ') as val1, replace(replace(rtrim(replace(replace(@val2,' ','^'),'0',' ')),' ',''),'^',' ') as val2 ) as t1
MadhivananFailing to plan is Planning to fail