Syntax for MySQL LOAD XML “SET” parameter?

eliplyEsseway

New Member
I am trying to load an xml file containing timestamp entries in the "20120924 22:12" format into MySql.I am using the LOAD XML feature. Of course it's not working because MySQL is expecting "2012-09-24 22:12". If I was using LOAD FILE I would add \[code\]SET tmstmp = str_to_date(@var3, '%Y%m%d %h:i%')}\[/code\]to my command, where the tmstmp data is in column 3 of the tile. So for XML I'd like to use\[code\]SET tmstmp = str_to_date(@tmstmp, '%Y%m%d %h:i%')}\[/code\]where tmstmp is the tag containing my timestamp data. But this doesn't work. @tmstmp is empty. How do I access tags in SET statements under LOAD XML? The MySQL documentation just defers to the LOAD FILE documentation but it's not there of course. Thanks for any help.
 
Back
Top