MYSQL insert syntax
I have some problems with inconsistent data that I want to load into a
mysql database. Is it possible to write an INSERT statement that searches
for unordered tags?
As an example I have a file with lines like these:
POET="Adams, A." GENDER=F DATE=1996 DATE2=1996 NAME="BLURB"
POET="Adcock, F. and Tartler, G." NAME="THE COANDA EFFECT" GENDER=F
DATE=1989 DATE2=1989
The whole file is unordered in terms of its tags. Is it possible to look
for tags on an unordered line in an insert statement or do I have to parse
the whole file first? In the Table the columns would be: Poet, Name,
Gender, Date, Date2. I want the insert statement to read the lines and put
the appropriate information in the table. Also, the quotations are not
around all of the information but the tags are always in caps followed by
an equals sign.
Thanks for the help.
No comments:
Post a Comment