Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    MYSQL


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Import .xls File Into A Mysql Database


I have a .xls file that i would like to import into a mysql database, I am ok creating the mysql table in phpmyadmin on my webspace but i cant work out or find any useful tutorials on how to import the database from the .xls format and get it into the database short of building a form and submitting by hand which would take far to long.




View Complete Forum Thread with Replies

Related Forum Messages:
How Do I Import .csv File Into My Mysql Database?
I woould like to know how to import csv files into my mysql databse, I tried the:

LOAD DATA LOCAL INFILE '/importfile.csv'
INTO TABLE test_table
FIELDS TERMINATED BY ','
LINES TERMINATED BY ''

Commands but I dont know where would i put these command and wher do put the "importfile.csv", what directory and location?

View Replies !
Import Excel File Into Mysql Database
I was looking for information on how to import an excel file or other text file into a MySql database. I have done this with both access and SQL Server and am looking for a way to do this in MySql. I have several hundred items i want to import into a parts database that is currently in an excel file but can be saved as comma separated or other format.

View Replies !
How To Import Csv File (generated By Openoffice) To Mysql Database?
how to import csv file (generated by openoffice) to mysql database?

View Replies !
Import Only 1 Database From A Mysqldump File
i like to import only one Database include 37 Tables from a dumpfile. But i must be shure that only this one Database is imported. The dumpfile include more Databases (70) with >1500 Tables

Can i use this --database=onlyforum option for mysql ?

mysql -hlocalhost -uuser -p --database=onlyforum < alldatabases.sql

ore is there a other option to use?

View Replies !
Import Excel File To Database
to import an excel file into a database making sure the cells in excel go to the correct rows in the mysql database?

View Replies !
How To Import Excel File Into An Already Normalized Database?
I have a problem with the issue in the subject, i have all data in one big excel file, in a denormalized form, and on the other side, i have mysql database with many tables, which is already in production, and it is of course in the 3rd NF. How do i go about importing that excel file , is there any good tool i could use to handle prim/foreign key issues for me?

View Replies !
Dump File Import :: #1046 - No Database Selected
I've a dump file of mysql. But when i want to import it shows me a error message.........

--
-- Table structure for table `ADMIN`
--

DROP TABLE IF EXISTS `ADMIN` ;

#1046 - No database selected

View Replies !
MySQL Import Text File Too Big?
Our production database in an exported textfil runs about 60 MB.
Compressed that's about 9 MB.

I'm trying to import the export into another machine running FC3 and
mySQL 11.18, and it appears as though the file may be too big!
When I try to do it via command line:

mysql -u root --host=localhost printing < ./printing.txt

It eventually errors out with a "syntax error on line X" and only about
half the tables get imported, and MyPHPAdmin GUI interface says it has
a 2MB file limit on importing.

This concerns me. If something were to happen to our production
database, how am I going to restore it?

I tried to do a search on mysql.com, but that's a less than helpful
site for support. A newsgroup search on the topic didn't come up with
much, so maybe I'm just bad at using keywords.

View Replies !
Mysql Import CSV File Problem
I use this query in a PHP script to import a csv file

$result = "
LOAD DATA INFILE '$uploadlocation' INTO TABLE $table2
FIELDS TERMINATED BY '$seperator'
ENCLOSED BY '"'
LINES TERMINATED BY '
'
";

It's been working fine for a long time until now alll of a sudden this error popped up:
Can't get stat of '/home/xxxx/public_html/data/xxxx.csv' (Errcode: 13)

The user has File_priv set to yes.
I even tried importing with the mysql root account but that didn't work either.
Using LOAD DATA LOCAL INFILE gives : 1148: The used command is not allowed with this MySQL version, so that's not an option

View Replies !
Csv File(s) Exists Import Into MySQL
I am hoping to write a solution that imports any csv files that exist in a given directory into mySQL. I know how to write a SQL command to import a single file, but am wondering the best method to automate importing whenever a file shows up in a given directory (and even better move them to another directory post-import).

Is there something like a trigger inside of mySQL that can help me do this? I can run a cron or the like to check for files, parse them, run the mySQL commands, move them, etc. but I am hoping for a much cleaner internal answer. Since it will eventually be hosted I may not have the capability to run scripts.

View Replies !
Import Data From Text File Mysql
Im going to write a script in linux that updates my mysql database. How can i write a sql statemtn that updates my mysql table from a text file located on my machine?
lil confused bout the path of the txt file?

View Replies !
Import Tables From Another Non-Joomla Mysql File
Can someone tell me how I can import tables from another non-Joomla mysql file into Joomla? Basically it is just from one mySQL database into another. I use phpMyAdmin to import and export the entire file but I don't know how to do queries.

What I am trying to do is import all the articles I have built up using ccTiddlyWiki into Joomla. The only table names of relevance from the source file are:

id - title- body

IN other words, just the bare essentials.

The target files has a table called jos_content with columns:
id - title - title_alias - introtext - fulltext in that order and others but are not important.

I think it is fairly simple but I am not trained enough. I have 200 items so it would save an enormous amount of time!

It seems easy but I don't know enough about queries to do it well. I'm hoping that I can import the articles and then just go through the list in Joomla adding subtitles and so on to conform to Joomla database essentials.

There is another column called tags which I would be happy to have as well and I'm not bothered about start dates or anything else.

View Replies !
Import Data From .txt File Into MySQL Table
i have text files which are generated daily and stored in a folder on the C: drive. I was wondering what would the mySQL command be to import that data into a mySQL table. The text file does not have a header with the field names so would i have to make that table first with the desired columns?? Also, does the file have to be in the databse directory or can it be anywhere on the machine??

View Replies !
Error In Mysql Import (text File)
Error

SQL query:

-- phpMyAdmin SQL Dump
-- version 2.8.0.2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: May 27, 2006 at 12:21 AM
-- Server version: 4.1.18
-- PHP Version: 4.4.2
--
-- Database: `lopata_trnew`
--
-- --------------------------------------------------------
--
-- Table structure for table `Register`
--
CREATE TABLE `Register` (
`id` int( 10 ) unsigned NOT NULL AUTO_INCREMENT ,
`Date` date default NULL ,
`Name` text,
`Company` text,
`Address` text,
`City` text,
`State` tinytext,
`Zip` text,
`marketarea` text,
`Phone` text,
`Email` text,
`Comments` text,
`OwnerNameA1` text,
`OwnerNameB1` text,
`PropAddr1` text,
`PropZip1` text,
`OwnerNameA2` text,
`OwnerNameB2` text,
`PropAddr2` text,
`PropZip2` text,
`OwnerNameA3` text,
`OwnerNameB3` text,
`PropAddr3` text,
`PropZip3` text,
PRIMARY KEY ( `id` )
) ENGINE = MYISAM DEFAULT CHARSET = latin1 AUTO_INCREMENT =49;

MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '

CREATE TABLE `Register` (
`id` int(10) unsigned NOT NULL auto_increm' at line 1

View Replies !
Import Of Database In Mysql
I get this error when I am importing the database. What am I doing
wrong?

ERROR 1064 at line 625735: You have an error in your SQL syntax near '
begin_excerpt varchar(250) default NULL,
PRIMARY KEY (id)
) TYPE=MyISAM' at line 5

View Replies !
Import A Mysql Database
I have download a mysql database.
But I don't know how to impoet it to mysql server.

View Replies !
What Database Do You Use To Import Into MySQL
I am setting up a MySQL database and find phpmyadmin very slow to enter data, so I am thinking of importing all the data from Microsoft Access 2003 instead. Or I could create a php page to enter the data.

What do you guys use as your main database to import into MySQL?

View Replies !
Import Database From MySQL3.x To MySQL 4.x
I want to import a MySQL 3.x Databse to my new shiny MySQL4.x.
I did a backup with
/usr/local/mysql-standard-4.0.14-pc-linux-i686/bin/mysqldump -u root -p --opt -A > mysql_lamp_backup.`date '+%Y.%m.%d'`.sql

And i tried to import it to MySQL4.x with:
/usr/local/mysql/bin/mysql -u root -p < mysqlbak

The error:
ERROR 1064 at line 598: You have an error in your SQL syntax. Check the
manual that corresponds to your MySQL server version for the right syntax to use
near '-en' at line 1

This is teh line 598:
CREATE DATABASE /*!32312 IF NOT EXISTS*/ blabla-en;

IF i change the name to blabla_en, it works fine.

#### Another issue:

ERROR 1064 at line 830: You have an error in your SQL syntax. Check the
manual that corresponds to your MySQL server version for the right syntax to use
near '!
,'poll','Questions','','',10,'r',11.61,11,10,00100 00000010000,'','A'),

ANd this 830 line ist just far to long to post it :)


So do i have a general problem or what did i do wrong so far?

Cheers, Mario

--
COMPUTERBILD 15/03: Premium-e-mail-Dienste im Test
--------------------------------------------------
1. GMX TopMail - Platz 1 und Testsieger!
2. GMX ProMail - Platz 2 und Preis-Qualitätssieger!
3. Arcor - 4. web.de - 5. T-Online - 6. freenet.de - 7. daybyday - 8. e-Post

View Replies !
Import Old Data To New Mysql Database
My machine was down before, fortunately I have back up the whole
/usr/local/mysql directory. Now I have setup a new mysql on a new
machine, how can I import the old data back to the new database??

My old mysql version: mysql-3.22.32
new mysql version: mysql-max-4.0.3-beta-sun-solaris2.7.sparc

I used to run the mysql like this:

/usr/local/mysql/bin/mysql abc

should I add the user abc to my new database first? and how?

View Replies !
Export/Import MySQL Database
I am writing an application usig PHP/MySQL on my local development box. Now that the app is complete, I am ready to move it into production and live on the domain. What is the best way to go about moving that database from the local MySQL platform onto my hosting?Should I export it into a SQL file and rebuilt it on the host?

View Replies !
Import Excel Sheet Into Mysql Database
I need to import .xls file to mysql database..i tried using LOAD DATA INFILE syntax but m not successfull...

View Replies !
Import Minicom Data Into Mysql Database
I have mysql 5 running on fedora core 5, and I have data input through the minicom. I am trying to establish a connection between the minicom and database.

View Replies !
Import Excel Data Into Mysql Database
I am new to MYSQL..I have a excel sheet with 4 colums and several rows of data.. I need to import all these into a database which i have created in mysql..I tried using

LOAD DATA LOCAL INFILE 'D:student.xls' INTO TABLE test.student
FIELDS TERMINATED BY '
' ENCLOSED BY '' ESCAPED BY ''
LINES TERMINATED BY '
';

But i get error saying Data truncated at column'x'..

View Replies !
Import A Directory Of Text Files Into A Mysql Database With Php?
I have a directory of text files that i'd like to import into a msql
table... I was wondering if there's an easier way to do this with
php/mysql, I'd like to avoid copy/pasting the entire directory
(thousands of files) into the database if i can.

The directory structure of the text files resembles...

somepath/A/Aerosmith/Song Name.txt - (extention varies)

What i'd like to do is use php to scan the directory and input
the file path information and the content from each file into a table
like...

Dir Artist Song Text Type
------------------------------------------------------------------------
A Aerosmith Song Name Fa La La La La (example text) File Ext
B Beatles Song Name Fa La La La La (example text) File Ext

View Replies !
Import Excel Sheet Datas To A Mysql Database
I have a dotnet application in which i have to import data from an excel sheet and store datas in mysql table to display those datas in my dotnet application. Iam using this datas to display datas for generating employee salary slip in my dotnet application. pls do help me with source code in C#.

View Replies !
How Do I Import A Mysql Database To Godaddy Hosting Account?
i dont know whether this is the right forum 2ask on.... But Id like to know how can I upload import a Mysql database into my hosting account at Godaddy...


View Replies !
Import .sql File
I am working with mysql for the first time. I figured I would try to learn a little about it by creating a Cacti SNMP monitoring server. I have created a database in mysql called cacti. The root password is also cacti. I have been fighting with importing the included cacti.sql file for days. I have tried multiple syntaxes and get the same error everytime. Here is what I have done:

mysql> mysql -u root -p cacti cacti < c:inetpubwwwrootcacticacti.sql;
ERROR:
Unknown command 'i'.
Show warnings disabled.
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'acti.
sql' at line 1

I am sure this is a stupid mistake because everything I read makes it sound like importing .sql files is easy.

View Replies !
Import A Csv-file Via Www
I have a php-page whitch checks and updates a database. I want to make it possible for users to import a csv-file into the database.
Does anyone know how to fix this?

View Replies !
Import CSV File
I should import a csv file into mysql table, so i write:

load data local infile <file name>
into table <Table name>
fields terminated by ','
enclosed by '"'
lines terminated by '
';

However, I find that it is time consuming for writing the query "fields terminated..............by '
'"
since I should import the csv many time.

So can I modify the default value of "fields terminated by" so that I could omit that part when I import the file?

View Replies !
Import A .sql File
Ok, probably any easy task but not having much luck here. i exported to an .sql file a database from phpmyadmin. now, what i want to do is use that file to recreate the database on my local test machine. i do not have phpmyadmin installed on this system, so am looking for the proper query i can use at mysql command line to run.

View Replies !
Import A Text File
I have a utf8 txt file to import in a MySQL db, cause I must create a
web-application in PHP for reading this information on-line.
I have create a new DB in MYSQL 4.1.1a setting CHARACTER=utf8,
then I have create a table t1 with character set utf8 and some fileds
also with CHARACTER=utf8.
Then I imported the Txt file (really in UTF8 format, with 22600
records!) in my db. MySQL have imported the non-utf8 field correctly,
26000 records.
When I try to read this utf8 filed they appear like "???-?-???".
Then, also my PHP application show this field with stranges
characters. I have try also with PHPfunction utf8_encode with no
success

View Replies !
Import Text And Csv File
i want to import either text or csv file to database how can i do this..i have tried mysqlimport command but its giving some error

View Replies !
Import File With SQL Queries?
I have created a number of files that have ~1000-2000 SQL queries in them. I want to know if there is a way to import these files into the database through a script of some kind. At first I thought LOAD DATA INFILE, but that seems to be for a file that simply contains delimited data. I actually have INSERT SELECT WHERE etc... statements.

I don't want a script that reads the file and sends the commands individually ... it takes far too long. I have been importing them manually through phpmyadmin but I want to automate the process.

View Replies !
Fastest Way To Import A *BIG* .sql File
i've a big file with sql stataments: it's about 35 GB (about 2 GB if zipped).

What's the fastest way to import it into mysql? Is there a way to import it from the zip/bzip2 file?

View Replies !
Text File Import
I'm importing a large text file (8 million lines) into a mysql table via the heidisql front end. Each line has 42 fields (tab separated) so there's a lot of data to bring in.

I tested the import with a truncated version of the text file (10,000 lines) and the import worked fine. It took about a minute (i think) to import. Now though, the full version (which is 800x as long) has been importing for nearly 48 hours. Heidisql seems to be still working - it hasn't frozen, it's busy.

Is it normal for a file of this size to take so long to import?

View Replies !
How To Import Text File?
I am using MAMP and am trying to import a large text file (up to 30mb) that is defined by position i.e., space 1-8 = ID, space 9-14 = Description, etc. The only option for import is via SQL or CSV file.

View Replies !
Import Incomplete CSV File
full sequence should be:

name, surname, telephone, postcode

but the data I have in CSV is more like
name1, surname1, postcode1
name2, surname2, telephone2
surname3, telephone3, postcode3
etc.

so, in many rows the data pattern is incomplete.

Is there any way to solve this during INSERT? best thing would be to make mysql able to insert an empty field where information is missing, and the relevant one where available..

View Replies !
Import CSV From String, Not A File
does anyone know if it's possible to import "geek@geeksupport.com,test@example.com,abc@example.com" into a temporary table with 1 field into mysql? This will be coming from a webpage, not a file.

I know I can chop it in php and do an insert on each email address, but hoping if there's some kind of built-in mysql to do this.



View Replies !
Import Sql File Into PhpMyAdmin
I am trying to import SQL file which contains Structure & data into PhpMyAdmin locally and i get error message:

You have an error in your SQL syntax near 'ENGINE=MyISAM AUTO_INCREMENT=36 DEFAULT CHARSET=latin1' at line 14

The file size is about 1.95 MB. The file was exported through SQLyog as SQL Statements and the following fields were ticked:

-Include "USE dbname-" statement
-Include "DROP TABLE" STATEMENT
-Add "CREATE DATABASE"
-Lock All Tables For Read
-Create Bulk Insert Statements

The fields left unticked are:

-Flush Logs Before Dump
-Add Lock Around Insert Statements
-Set FOREIGN_KEY_CHECKS=0

Don't know much about MySQL, any help would be much appreciated.

View Replies !
Import 20GB Sql File
I am importing 20GB sql file to a MySQL database but receiving an error. I am executing the following command on dos prompt

Code:
mysql -uroot -p database_name < e:data.sql
The error I get

Code:
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'data.sql
39,59562,4,0),(11183,59850,4,0),(41,39376,4,0),(39,59861,4,0),(41,4884' at line 1
I have exported data on CentOS using mysqldump.

I did not make any change to the file except uncompressing after download from the live server.

What can I do to resolve this issue?

Windows Server 2003 Enterprise Edition
MySQL Version: 5.0.51a-community-nt MySQL Community Edition (GPL)

View Replies !
Import Big .sql File Not Working ?
I am having trouble importing a large SQL file into MySQL.

I am pasting this into start run cmd:

cd M:MySQLMySQL Server 5.1in
mysql -h localhost -u root -p db_name < db_data.sql

and I get this message:
The system cannot find the file specified.

I have one disk drive that is partioned. The CMD window starts on the C drive but MySQL is installed on my M drive. I have tried changing drives by entering:
cd M:

but nothing happens it stays on the C drive.

View Replies !
Data Import From Text File
When I try to import a text file with new data for an existing
table I get the error "1148 - the used command is not allowed
with this MySQL version."

I have tried with both PHPMyAdmin2.3 and with MySQLFront 2.5.
Both these GUI programmes have an "import from text file" command
which I have used successfully several times to add entries to
this table before - running just this MySQL version. I have
structured the data in the text file in just the same format as
previously.

Both these programmes are connecting to the database successfully
now and will display the contents of the existing table data and
strcutre of the database etc (despite an earlier connection
problem which seems to have been solved spontaneously).

But both now deliver exactly this error message (and therefore I
assume it is MySQL and not the interface programmes which is
doing it).I cannot see that I am doing anything different.

I have MySQL 4.0.12 on Windows ME PC with a local Apache server
and PHP.

View Replies !
Import Large Excel File
I have a large excel file, and some of the contents of it contain commas. I was wondering how I can import this information into mysql. I was thinking of using csv formant, but think the excess commas in the populated information will cause issues with this.

View Replies !
Import File Delmited By The | Character
I have a .txt file of about 200,000 lines that I need to import into a mysql database. Each line contains four records, but unfortunately they are seperated by the | character. I have tried importing it using the LOAD DATA command but it imports everthing into one field. I need to import into four fields.
how to tell mysql that the file is | delimited?

View Replies !
How To Create A Table And Import A CSV File
Server version: 5.0.41-community-nt
phpMyAdmin - 2.10.2
MySQL client version: 5.0.37
Windows XP Professional on home PC
Linux shared hosting

I am a total newbie to MySQL and have never created a table. I'm using oscommerce and have the stock database that came with it and it is up and running on both my home computer and on the live server although the shop is not selling anything yet as it has no products other than the basic oscommerce product list. I'm hoping to do all this on my home computer before uploading to the live server which I do know how to do using import.

My supplier has sent me a load of CSV files with the headers as follows:
actionidcategory_pathnamedescriptionshort_descriptionimagespricetax_applicabledelivery_chargespecial_offerorder_locationnumber_in_stockproduct_weightproduct_codedoes_it_have_optionsname_of_optionstype_of_optionsoption_itemsprice_difference_of_option_items*EOL*

Total of 21 fields.

I found this information on how to upload CSV files but have no idea what it all means although I did try and failed.

To import an Excel file into MySQL, first export it as a CSV file. Remove the CSV headers from the generated CSV file along with empty data that Excel may have put at the end of the CSV file.

You can then import it into a MySQL table by running:

load data local infile 'uniq.csv' into table tblUniq
fields terminated by ','
enclosed by '"'
lines terminated by '
'
(uniqName, uniqCity, uniqComments)
The fields here are the actual tblUniq table fields that the data needs to sit in. The enclosed by and lines terminated by are optional and can help if you have columns enclosed with double-quotes such as Excel exports, etc.

I created a table called mynewtable with 21 fields but haven't got a clue what I should put in all the fields so it will not let me save it.

View Replies !
Command Line :: Import File
I'm the beginner, I'm struggling with simple question

I try to import file into my db following this guide:
After I type -e 'CREATE TABLE imptest(id INT, n VARCHAR(30))' test it appears the cursor:
->

I enter the ";" character but it raise error "ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use..."

I use mysql version 5.1. I have to do what?

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved