I have an ID column data that is having space at the last, and i am comparing this column data with other table column data as its nto matched getting NULLS
ID - 65447093
if i copy and paste in notepad, the above id has space at the last and hence it accepting 9 charactrers; tried ltrim rtrim but didn't worked.
rtrim(ltrim(ab.ID)) = (CASE WHEN LEN(rtrim(ltrim(ab.ID)))=8 THEN RIGHT(en.IDTrim,8) ELSE en.IDTrim END)
how replace func will work here?