[Solved] Inserting records from csv

Creating tables and queries
Post Reply
User avatar
jza
Posts: 239
Joined: Mon Nov 03, 2008 11:33 am
Location: Cancún, Mexico

[Solved] Inserting records from csv

Post by jza »

I have a CSV and want to insert its data into a ODB table. I tried the SQL statements and can't use INSERT INTO... also tried just copy pasting but didnt work for multiple records. Any other ideas.
Last edited by Hagar Delest on Sun May 28, 2017 9:03 pm, edited 2 times in total.
Reason: tagged [Solved].
AOO 4.1.1 on Arch Linux
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Inserting records from csv

Post by Villeroy »

Depends on the csv.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
charlie.it
Volunteer
Posts: 417
Joined: Wed Aug 21, 2013 2:12 pm
Location: Italy

Re: Inserting records from csv

Post by charlie.it »

jza wrote:I have a CSV ...
Ciao, can we see the file?
charlie
Italian AOO Admin
macOS 14 Sonoma M1: Open Office 4.1.15 - LibreOffice 7.5.7.1

http://www.charlieopenoffice.altervista.org
User avatar
jza
Posts: 239
Joined: Mon Nov 03, 2008 11:33 am
Location: Cancún, Mexico

Re: Inserting records from csv

Post by jza »

Thanks I solved it by adding the whole SQL sentence to each row.
AOO 4.1.1 on Arch Linux
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Inserting records from csv

Post by Villeroy »

I don't understand. Would you mind to share your solution with us?
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
jza
Posts: 239
Joined: Mon Nov 03, 2008 11:33 am
Location: Cancún, Mexico

Re: Inserting records from csv

Post by jza »

I insert the cv fields withing the VALUES() of the INSERT INTO table (column...) VALUES (csv-values....)
AOO 4.1.1 on Arch Linux
Post Reply