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 ..."
-
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 progra
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 program
> 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 n
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
sh