Quantcast
Channel: SQL Server Data Warehousing forum
Viewing all articles
Browse latest Browse all 1203

Importing data with special character out of sql server

$
0
0

I have a sql script that I run in sql server. After I get the results, I need to import them out to excel file. Since I am on a production server, I only have a read only rights. I can not create any object on the server. This leaves me with either copy data or save results as csv. both do not work well with me due to some fields with special characters that causes these fields to wrap around when I copy them to excel file, and I get several blank rows. These fields are email, address, phone (some phone #s are entered with + sign in the start of the field). I am not sure what to do to get this data out. I tried coping the data, one column at a time and do a lot of data manipulation to get the data out. I tried bcp to create fmt file, however, the links I found, only have the sample to format a table/view in the database into the .fmt file, is there any better way to export the data set out to excel?

thanks


Viewing all articles
Browse latest Browse all 1203


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>