Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1056157
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T17:40:31+00:00 2026-05-16T17:40:31+00:00

All, I am trying to inject a long text entry into a SQLite database,

  • 0

All,

I am trying to inject a long text entry into a SQLite database, in a TEXT field. This text has new lines in it (i.e. it spans multiple paragraphs).

I can get the new lines to show up if I do the INSERT manually:

INSERT INTO "LOGENTRY" VALUES(5,40,'PLACE','line1
line2

line4
',1283990533315,'4A','TEXT','',NULL);

but if I have the equivalent text in a CSV file and attempt to .import it into the table, I get an error that it’s expecting more columns than exist (as soon as the new line is encountered, the program assumes it’s the end of the input and thus it’s missing columns).

Is this possible? Or is the only way to manually do each INSERT?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T17:40:31+00:00Added an answer on May 16, 2026 at 5:40 pm

    Your problem is the csv format: sqlite doesn’t support values containing newlines.

    In the sqlite dialect:

    • Commas separate fields

    • Double quotes can be used to group a field which contains commas.

    • New lines delimit records

    You either need to escape/remove your new lines, or, use some other more suitable file format.

    The following (sed) regular expresion will “delete” unwanted line feeds

    s/\(,"[^",]*\)$/\1\1/g
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 515k
  • Answers 515k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer This should do what you want, but I got rid… May 16, 2026 at 6:30 pm
  • Editorial Team
    Editorial Team added an answer You obviously have to have a model for storing searches… May 16, 2026 at 6:30 pm
  • Editorial Team
    Editorial Team added an answer The inner createThread call is called at the bottom from… May 16, 2026 at 6:30 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I'm trying to inject some CSS that accompanies some other HTML into a C#
I'm using an MVC setup and I'm trying to inject javascript into my views
I'm working on an application using ASP.NET MVC 1.0 and I'm trying to inject
I have a service that is hosted in WAS. I am trying to inject
Using Prototype 1.6's new Element(...) I am trying to create a <table> element with
The problem I am trying to solve is that I want to check all
All im trying to do is create a login control that i want to
All, I'm trying to set up a system whereby emails sent to a certain
Good Morning All, I'm trying to refactor an SQL stored procedure. I'm no SQL
I've noticed a couple other questions about handling this, but all seem to suffer

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.