Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

CSV FILE FROM SQL 2005

Posted on 2013-01-23
3
Medium Priority
?
393 Views
Last Modified: 2016-02-11
Hi trying to export data from SQl 2005 using the SSIS wizard, however the last column which contains a narrative wraps into the next line, how can I export the CSV without have the narrative column wrap into the next line?
0
Comment
Question by:Tech315
3 Comments
 
LVL 12

Accepted Solution

by:
Jared_S earned 1260 total points
ID: 38811105
Have you tried replacing the line returns in the field with something like this?

replace(replace(NarrativeColumn, char(13),' '),char(10),' ')
0
 
LVL 40

Expert Comment

by:lcohan
ID: 38811197
For SQL 2005 only you could do it directly to CSV or XLS from SQL query command like:


--SQL 2005 only
EXEC master..sp_makewebtask
      @outputfile = 'c:\testing.csv',
      @query = 'Select * from dbName.schemaName.tableName',
      @colheaders =1,
      @FixedFont=0,@lastupdated=0,@resultstitle='Testing details'
0
 

Author Closing Comment

by:Tech315
ID: 38814514
Thanks Jared it did the trick.
0

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Recursive SQL is one of the most fascinating and powerful and yet dangerous feature offered in many modern databases today using a Common Table Expression (CTE) first introduced in the ANSI SQL 99 standard. The first implementations of CTE began ap…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question