Quantcast
Channel: MySQL Forums - Microsoft SQL Server
Viewing all articles
Browse latest Browse all 686

ExtractXML in MySQL 5.1.5 returns BLOB. I need VARCHAR. (1 reply)

$
0
0
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.

Viewing all articles
Browse latest Browse all 686

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>