0
votes

I have a column that has data type varchar(max). Some rows in that column have long text data. When I copy the SQL result set from that column and paste to excel, the row gets split into multiple rows. I want to past in sunch a way that single cell data from SQL server go to single cell in excel. I am not sure how to fix that problem. Any suggestion would be appreciated. Thank you

2
Are you copy/pasting from SQL Server Management Studio? - Seth Moore

2 Answers

2
votes

Use Excel Import from SQL Server feature. It should import each row of data into a single row in Excel and each column into a single column.

0
votes

You can try to select data directly into excel spreadsheet.

Check this for more details http://blog.waynesheffield.com/wayne/code-library/ad-hoc-querying/#codesyntax_5