• I think another solution...................

    select @sql

    instead of print @sql.................

    It will gives all characters in single line............................