Re: Import a text file

2007-07-07 Thread Olaf Stein
In python - import re file = open(path/to/file,r) for line in file: line = line.replace(\n,)# this is not always needed columns = re.split(\s+,line) print columns#is now a list print columns[0] sql = insert into ... -

Import a text file

2007-07-06 Thread Scott Swaim
I have a text file that is in the Panasonic DBS format. It is a log file that comes from my phone system. I have a program that monitors the serial port and write the input to a file. I have no control over the format of the file. I would like to on a nightly basis shut down the logging

Re: Import a text file

2007-07-06 Thread Michael Dykman
Your first instinct is correct, a parsing script in the language of your choice would make short work of this. - michael On 7/6/07, Scott Swaim [EMAIL PROTECTED] wrote: I have a text file that is in the Panasonic DBS format. It is a log file that comes from my phone system. I have a program

Re: Problem with data import from text file

2003-08-14 Thread Victoria Reznichenko
adrian GREEMAN [EMAIL PROTECTED] wrote: 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. If you use LOAD DATA LOCAL you should enabled it with local-infile option. I have tried with both

Re: Problem with data import from text file (part two)

2003-08-14 Thread Victoria Reznichenko
adrian GREEMAN [EMAIL PROTECTED] wrote: I have also read the manual section on this {as I should have done] to try and understand it and how to enable reading a local file - the discussion section seems confusing and confused. I tried following what others have done and modified the ini

Re: Problem with data import from text file solved, I think.

2003-08-14 Thread Hans van Harten
FYI After digging out some documentation ( RFM indeed ) it is all so simple in DBD::mysql ... As of version 3.23.49 LOCAL within LOAD DATA _may_ be disabled in the _client_ library. By adding an option to the DSN-string within the connect statement the function is re-enabled at the client side

Problem with data import from text file

2003-08-14 Thread adrian GREEMAN
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

Re: Problem with data import from text file (part two)

2003-08-10 Thread Hans van Harten
adrian GREEMAN wrote: I have also read the manual section on this {as I should have done] to try and understand it and how to enable reading a local file - the discussion section seems confusing and confused. I tried following what others have done and modified the ini file with

Re: Problem with data import from text file (part two)

2003-08-09 Thread adrian GREEMAN
I have also read the manual section on this {as I should have done] to try and understand it and how to enable reading a local file - the discussion section seems confusing and confused. I tried following what others have done and modified the ini file with set-variable=local-infile=0 and with

Subject: Re: Problem with data import from text file (part two) Thanks

2003-08-09 Thread adrian GREEMAN
Thanks for the advice - and your patience in giving it to me. The recommended changes in the ini file worked (but only along with removing the word local from the load data local infile instruction) [since I have a localhost Apache server as testing environment] thanks again to those more

Re: Problem with data import from text file

2003-08-07 Thread adrian GREEMAN
Please excuse a relative amateur worrying a problem. I got a nice reply from Victoria Reznichenko yesterday on a difficulty loading data from a text file. She said 4.0.12 had a bug and, I as understood her answer, I should therefore enable load local infile. Instead I uninstalled 4.0.12 and

how to import a text file into the mysql database

2001-08-28 Thread Chakravarthy K Sannedhi
hello all, i am trying to install web calendar software on my machine, which is available at sourceforge.net website. to run that software first of all a textfile named tables-mysql.sql needs to imported into the mysql database. for doing that i typed the following command at the shell prompt

Re: how to import a text file into the mysql database

2001-08-28 Thread Daniel Woods
shell # mysqlimport -u root -p webcalendar tables-mysql.sql where, 'webcalendar' is the database that i have created for this purpose. after entering the password at the password prompt it is displaying the following error: mysqlimport: Error: You have an error in your SQL syntax near