MySQL Forums
Forum List  »  Microsoft SQL Server

ExtractXML in MySQL 5.1.5 returns BLOB. I need VARCHAR.
Posted by: Rahul Kumar
Date: July 04, 2010 02:47AM

With MySQL version 5.1.5, I am extracting the values from input_xml as shown below. Sample xml attached.
The values are extracted as type BLOB, but I need to insert these values into another table “complaints” as type VARCHAR. The schema for complaints table is also attached.

MySQL Commands:

select input_xml from tasks where process_id = 212943 INTO @xml;

INSERT INTO `complaints1`(`ComplaintSub_Category`,`ComplaintID`,`Complaint_Raise_Date`,`Complaint_Description`,
`Assigned_to`,`Complaint_Status`,`Complaint_Close_Date`,`Division`,`Sub_Division`,`Service_Station`,`ComplaintType`)
VALUES('SELECT ExtractValue(@xml, '//*[8]')',
'SELECT ExtractValue(@xml,'//*[1]')',
'SELECT creation_date from tasks where process_id = 212943',
'SELECT ExtractValue(@xml, '//*[13]')',
'SELECT user_id from tasks where process_id= 212943 ',
'SELECT ExtractValue(@xml, '//*[15]')',,
'SELECT ExtractValue(@xml, '//*[3]')',
'SELECT ExtractValue(@xml, '//*[4]')',
'SELECT ExtractValue(@xml, '//*[5]')',
'SELECT ExtractValue(@xml, '//*[7]')',);

Any inputs will be highly appreciated.

Options: ReplyQuote


Subject
Written By
Posted
ExtractXML in MySQL 5.1.5 returns BLOB. I need VARCHAR.
July 04, 2010 02:47AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.