Create a csv without the double quotes - sql

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

Related

importing excel table into database

I have a following table in xlsx format which I would like to import into the my sql database:
The table is pretty complicated and I only want the records after '1)HEADING'
I have been looking at php libraries to import into sql but they only seem to be for simple excel files.
You have two ways to realize that :
First method :
1) Export it into some text format. The easiest will probably be a tab-delimited version, but CSV can work as well.
2) Use the load data capability. See http://dev.mysql.com/doc/refman/5.1/en/load-data.html
3) Look half way down the page, as it will gives a good example for tab separated data:
FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\'
4) Check your data. Sometimes quoting or escaping has problems, and you need to adjust your source, import command-- or it may just be easier to post-process via SQL.
Second method :
There's a simple online tool that can do this called sqlizer.io.
You upload an XLSX file to it, enter a sheet name and cell range, and it will generate a CREATE TABLE statement and a bunch of INSERT statements to import all your data into a MySQL database.

What is the best way to import data using insert statements into a table in MS SQL?

I have exported a table from another db into an .sql file as insert statements.
The exported file has around 350k lines in it.
When i try to simply run them, I get a "not enough memory" error before the execution even starts.
How can import this file easily?
Thanks in advance,
Orkun
You have to manually split sql file into smaller pieces. Use Notepad++ or some other editor capable to handle huge files.
Also, since you wrote that you have ONE table, you could try with utility or editor which can automatically split file into pieces of predefined size.
Use SQLCMD utility.. search MICROSOFT documentation.. with that you just need to gives some parameters. One of them is file path.. no need to go through the pain of splitting and other jugglery..

how to export phpmyadmin table into csv?

I want to export a table of a database on phpMyAdmin into csv file.
I tried SELECT * FROM Table_Name into outfile'D:/wamp/www/projectName/fileName.csv'; but it's very ugly. How to make it more presentable?
Thank you in advance.
So you want it in Excel, in the end? In phpMyAdmin, view the table. In the tabs at the top, choose "Export". Choose whichever Excel format you want from the list at the left-hand side. Choose the options you want, hit "Go".
(If you just want CSV, this screen also gives you a friendly way of adjusting the CSV options, e.g. using a comma rather than a semicolon as the separator, which will probably go down better with Excel and other CSV importers.)
From Excel go to Data - (import) From Text, choose Delimited and select ";"

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.

importing CSV file into sqlite table

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.