• You need to create fixed sized variables for each column in the select query that can then be used to generate the result set.



    declare @res1 varchar(20)

    declare @res2 varchar(10)


    select @res1 = left(col1,20),

    @res2 = left(col2,10)

    from table

    You will then get fixed sizes so that the columns line up.

    Also to increase width of text file use:


    For more parameters see:


    The Users are always right - when I'm not wrong!