Hi This is zubair working in cleartrip on mysql. when trying to load xml file into mysql table ...... load xml data local infile ''person.xml'' into table person ERROR: ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''xml local infile ''person.xml'' into table person'' at line 1 can anybody give solution using mysql 5.0
Frederick Cheung
2009-Sep-14 08:03 UTC
Re: load xml data local infile ''person.xml'' into table person
On Sep 14, 5:30 am, zubair <juber...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi This is zubair working in cleartrip on mysql. when trying to load > xml file into mysql table ...... > load xml data local infile ''person.xml'' into table person > > ERROR: > > ERROR 1064 (42000): You have an error in your SQL syntax; check the > manual that corresponds to your MySQL server version for the right > syntax to use near ''xml local infile ''person.xml'' into table person'' > at line 1 > > can anybody give solution using mysql 5.0Load xml doesn''t exist in mysql 5.0 (http://dev.mysql.com/doc/refman/ 5.4/en/load-xml.html says it was added in 5.4.4). Most obvious solution would be to write some code to parse the xml and insert the records for you. Fred