• You can make use of the -W switch in the sqlcmd utility to remove trailing spaces.

    Pradeep Adiga
    Blog: sqldbadiaries.com
    Twitter: @pradeepadiga