Reputation: 107
I am trying to export a sql query (MS SQL 2014) into excel 2010. The problem is column values contain line breaks, so the remaining data gets copied to the next line in excel. Is there a way to get rid of this? Keeping the column as is? or maybe encapsulating the column so the sql considers it as one column and ignores the line breaks?
Here is my SQL Query:
select * from tbl_case
where (casenature not like '%<strong>%'
and casenature not like '%<br />%'
and casenature like '%from:%')
and userid in (select employeelogin from tbl_employees where riding='15010')
Upvotes: 0
Views: 412
Reputation: 36036
Works fine if I use the normal way to import data from MSSQL to Excel which is: in Excel, Data->From other sources->SQL server
.
To import data resulting from an arbitrary SQL query:
Properties...
Connection properties
window:
Definition->Command type
- SQL
Command text
field, write your queryUpvotes: 1
Reputation: 578
You can replace enter keys with space in select statement, and then export to Excel
Upvotes: 0