Link to home
Start Free TrialLog in
Avatar of jmokrauer
jmokrauerFlag for United States of America

asked on

Load infile question

If this question is very difficult or impossible for some reason, please let me know why I will give the points to expert who explains to me why.

This is a very simple version of a previous question I posted.  I need the sql command for mysql (database info at end of question) for reading the contents of an ascii file and inserting them into a blank table.  Below is the necessary information to write the query.

File name: c:\test\AD.asc
File contents:

06-29-2007,08:20:00,0.8484
06-29-2007,09:20:00,0.8488


The table to which I would like to add the contents of the file is called:  'x'.  Below I have outlined the table column names followed by their format and what it should be filled in with.  In advance, thank you very much.

date(DATE) - FILLED IN WITH THE FIRST COLUMN
time (TIME) - FILLED IN WITH THE SECOND COLUMN
open (decimal) - FILLED IN WITH COLUMN #3



Server info:
MySQL 5.0.45-community-nt via TCP/IP
MySQL Client Version 5.1.11
InnoDB tables
Avatar of Antonio Estrada
Antonio Estrada
Flag of Mexico image

It is possible but you'll need a program that can read the comma separated values and later add them to the database.

Which is why I'd ask, how frequently will it be to append these values to a database? is this database online or working locally?

Those questions in order to determine which language you should create a program and what conditions should it meet.

-V
ASKER CERTIFIED SOLUTION
Avatar of Dmitrii
Dmitrii
Flag of Russian Federation image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial