Scheduled command-line import Text or Excel to MySQL (entire file to single value)
Posted by:
Dan Cooper
Date: April 22, 2008 08:04PM
I need to find the best way to insert data in excel (or text) files into single values in an existing MYSQL table on a regular schedule.
I am not trying to import a delineated table.
Currently I am looking into using command-line.
For example:
Before: customer_01.txt, customer_02.txt, customer_03.txt
or customer.xls with worksheets Sheet1, Sheet2, Sheet3
Result:
MYSQL TABLE:
| CUSTOMER | CUSTOMER_DATA |
_____________________________________________________
| customer_01 | (data contained in customer_01.txt)|
| customer_02 | (data contained in customer_02.txt)|
| customer_03 | (data contained in customer_03.txt)|
I am aware of cmd-line mysqlimport to initiate LOAD DATA INFILE to load a file with terminated fields.
I do not know of the cmd instructions for INSERT INTO.
(with VALUES corresponding to entire text file content and WHERE conditions corresponding to file names)
Thank you.
Edited 1 time(s). Last edit at 04/22/2008 08:04PM by Dan Cooper.
Subject
Views
Written By
Posted
Scheduled command-line import Text or Excel to MySQL (entire file to single value)
9262
April 22, 2008 08:04PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.