• If I understand what you are asking its not possible. Because text files just can't do that. A text file is just that .. a file with text. It has no inherent column definitions, no formating etc.

    Now if you want to export it from SQL and still have it look like the columns you have in the grid output view you could copy it to excel instead of a text file. Or a table in word or something like that.

    Kenneth

    Kenneth FisherI was once offered a wizards hat but it got in the way of my dunce cap.--------------------------------------------------------------------------------For better, quicker answers on T-SQL questions, click on the following... http://www.sqlservercentral.com/articles/Best+Practices/61537/[/url]For better answers on performance questions, click on the following... http://www.sqlservercentral.com/articles/SQLServerCentral/66909/[/url]Link to my Blog Post --> www.SQLStudies.com[/url]