importing CSV file into sqlite table - sql

I've imported a CSV file into an sqlite table. everything went fine except it included quotes " " around the data in the fields. not sure why because there are no quotes in the CSV file.
anyone know how to avoid this or get rid of the quotes somehow?
Here's a screenshot from the firefox sqlite import settings I'm using:
thanks for any help.

I would guess that there really ARE double-quotes around the data. If you use Windows, a CSV will automatically open in Excel and it looks like there are no quotes because Excel interprets the file properly. However, I bet if you open the file in Notepad there will be quotes around the strings.
and then, as pointed out in your discussion above, truncate your sqlite table and reimport the data, indicating that the fields are enclosed by double quotes.

Related

SQL How can I copy a csv file into a table with this delimiter problem?

I'm trying to copy a csv file into a table. The delimiter is ',' but the csv file has a field named 'Description' where it also uses ',' but not as a delimiter. As part of a text.
How could I copy the csv file into the Import table?
If the comma is always within the double quotes then it shouldn't be a problem.
If not, you have a corrupt CSV file. The simplest way is probably to parse your file prior to importing to fix the corruption.
The details of how exactly to parse will depend on the dataset. Which fields are optional? which fields are compulsory? How many commas can occur at most? That kind of information is crucial for writing a parsing script.

Create a csv without the double quotes

Hello dear community.
I have a csv file that has values with double quotes in them. the csv is used in another script that doesn't like the quotes.
Can you help me re create the csv without quotes around the values.
best regards,
From the comments, it sounds like it's a setting in your SQL program's export options. You should be able to update that under Tools>Preferences>Database>Utilities>Export>CSV
Link below is a screenshot of the preferences window.
SQL CSV Export Preferences

Bash creating csv from values

I'm trying to create a csv in my bash script from some values I'm getting from another non-csv file.
The problem I see is that the values have commas(,) in them.
The csv file wrong because of that (the values with commas in them are 2 or more different values now)
Is there any way to get rid of that problem or any other way to build a csv in a bash script. I can create any other files too, it just needs to be compatible with standard sql import.
Thanks
I now added quotation marks before and after every value and it works great. The csv looks like it should.

How to remove Byte Order Mark from linked CSV file in VBA?

I have a CSV file. I linked it with access using DoCmd.TransferText acLinkDelim,....
It works fine.
However, in the linked view, the first column contains the BOM, so it shows up like Column1.
Is there a way to remove this?
Thanks
I have tried using the CodePage method without success.
I did find some ideas of removing the BOM before linking though. Here's one of them.

special character, sql, csv, phpmyadmin, excel

I have a csv file with special characters. I like to use Excel because I can change the columns, concatenate, etc., to change the entire table to my required table in MySQL. But Excel just opens it showing weird characters for special characters, so in the end before I import to my MySQL via phpMyAdmin, the data is alraedy broke.
What is the best way for me to edit a table with special characters for importing to phpMyAdmin later?
You should be able to tell Excel what character set to parse the file in when opening it. Try playing with the various character sets the import dialog has to offer. (It shows an import dialog, right? I only have OpenOffice here.)
You will need to go through that exercise anyway at some point, because you will need to know the file's character set when importing it into the data base.