I have this
XML:
3
myname
67
$34.00
I
also have a mysql
table:
+-----------+--------+-------------+
|
ID | Title | Price |
+-----------+--------+-------------+
| 1 |
title1 | $19.00 |
| 2 | title2 | $24.00
|
+-----------+--------+-------------+
I'm
trying to insert the xml file into the table with this
code:
LOAD XML LOCAL
INFILE 'pathtothefile/filename.xml'
INTO TABLE mytable
ROWS
IDENTIFIED BY ''
SET ID = id, Title=name,
Price=price;
But I get
this error #1054 - Unknown column 'name' in 'field list'
No comments:
Post a Comment