Solved

CSV FILE FROM SQL 2005

Posted on 2013-01-23
3
389 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 315 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SYbase 4 37
Help Required 3 110
TSQL query to generate xml 4 46
Where on a calculated field 1 23
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
Composite queries are used to retrieve the results from joining multiple queries after applying any filters. UNION, INTERSECT, MINUS, and UNION ALL are some of the operators used to get certain desired results.​
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

808 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