• elbedata (9/4/2009)


    I thought SQL Server was "smart enough" to remove the trailing spaces. You always learn something new here...:-)

    You mean, when changing the datatype from fixed length to varying length?

    I'd hesitate to describe an unasked for removal of trailing spaces "smart". There are builtin functions to remove them on demand, but no builtin functions to easily restore them after they have been removed...


    Hugo Kornelis, SQL Server/Data Platform MVP (2006-2016)
    Visit my SQL Server blog: https://sqlserverfast.com/blog/
    SQL Server Execution Plan Reference: https://sqlserverfast.com/epr/