Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

CSV FILE FROM SQL 2005

Posted on 2013-01-23
3
Medium Priority
?
392 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I'm trying, I really am. But I've seen so many wrong approaches involving date(time) boundaries I despair about my inability to explain it. I've seen quite a few recently that define a non-leap year as 364 days, or 366 days and the list goes on. …
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.​
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

721 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