atricapilla atricapilla - 1 year ago 106
SQL Question

SQL Server 2008: How to find trailing spaces

How can I find all column values in a column which have trailing spaces? For leading spaces it would simply be

select col from table where substring(col,1,1) = ' ';

Answer Source

SELECT col FROM tbl WHERE col LIKE '% '

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download