Hi thereWe have a SQL Server 2005 database (outside of my control).If i do a select distinct...select distinct ltrim(rtrim(lower(userEmail))) AS userEmail,from tbl_usersorder by userEmail asc
i get duplicate emails showing up, so i f i do...select distinct ltrim(rtrim(lower(userEmail))) AS userEmail, ascii(right(useremail,1))from tbl_usersorder by userEmail asc
i can see that a lot of them have trailing carriage returns (amongst a few other things) which is i think why the distinct is seeing them as just that.Question:Is there someway to do a distinct select on this data and ignore any potential trailing ascii chars such as (carriage return - 13)?i cannot alter the underlying data which is beyond my control.Any ideas a great help.====Paul