Skip to main content
Inspiring
September 23, 2026
Question

Handling Large Email Body Exported from SQL Server to CSV

  • September 23, 2026
  • 2 replies
  • 31 views

Hi ,

 

We are working with email data where the email body can contain around 46,000 characters. In Microsoft SQL Server, the complete email body is stored and displayed correctly within a single row.

However, when we export the query results to a CSV file, some email bodies are getting split across multiple lines in the CSV output. This appears to happen only for certain emails containing large amounts of text, line breaks, or special formatting.

Has anyone encountered a similar issue when exporting large text fields from SQL Server?

  • Is this expected CSV behaviour due to embedded line breaks?
  • Are there any recommended approaches to preserve the email body as a single field during export?
  • Has anyone faced related challenges when importing such CSV data into Appian?

Any insights or best practices would be appreciated.

Thanks!

    2 replies

    mikes0011
    Brainy
    September 23, 2026

    when we export the query results to a CSV file

    What method are you using to accomplish this?  I am curious what measures (if any) are being taken to sanitize the CSV contents, for instance, against the issues you describe.  It might be something out of your control, of course, in which case you’d need to consider workarounds to try and account for that on the query side, but we don’t have enough info from you yet to really guess.

    The Expression Guru
    stefanhelzle0001
    Brainy
    September 23, 2026

    CSV is just not a good format to export to. Why not export to a SQL file?