I often send query results to users through email or copy the results to Microsoft Word documents. Query Analyzer in text mode provides headings for the query results, but the headings don't copy and display well in Microsoft Excel or email. I can use Query Analyzer's output-file option, but that requires more mouse clicks than I want. Is there an easy way to copy a query result's column headings and values from Query Analyzer to Excel?

I regularly copy query results into Word documents by selecting Tab Delimited from the Query Analyzer Tools, Options, Results, Results Output Format menu. This option copies results into Word or Excel nicely. Excel formats the result set into a spreadsheet grid with no extra work. But if you copy into Word, you'll probably also want to use the convert text to table option, which formats the data into a table that's easy to read and to send in email.

End of Article




You must log on before posting a comment.

If you don't have a username & password, please register now.

Reader Comments

After copying the data to excel, insert one blank row. Copy the header row and paste it in the first cell of the Excel spreadsheet on the empty first row. Choose Data > Text to Columns option and follow the wizard to split the header row into the appropriate columns.

datalab

Article Rating 2 out of 5