Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 396
  • Last Modified:

CSV FILE FROM SQL 2005

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
Tech315
Asked:
Tech315
1 Solution
 
Jared_SCommented:
Have you tried replacing the line returns in the field with something like this?

replace(replace(NarrativeColumn, char(13),' '),char(10),' ')
0
 
lcohanDatabase AnalystCommented:
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
 
Tech315Author Commented:
Thanks Jared it did the trick.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now