dimanche 26 juin 2016
SQL - Parse HTML Data in Column
I have a column named "Message". In this column there is a data which is HTML code. I need to parse this HTML in SQL then split it 5 different column "Name" - "Surname" - "Email" - "Telephone" - "Message". Here is the HTML format that I need to parse;
<html>
<body>
<br><br>
<table>
<tr>
<td>NameSurname</td>
<td>kaydi peldi sord</td>
</tr>
<tr>
<td>Email</td>
<td>...@gmail.com</td>
</tr>
<tr>
<td>Telephone</td>
<td>535...5464</td>
</tr>
<tr>
<td colspan=2>Message</td>
</tr>
<tr>
<td colspan=2>Benfica-Fenerbahçe</td>
</tr>
</table>
</body>
</html>
First, split NameSurname to Name and Surname. The rule is split from last space (in this sample, it should "Name : ejder mehmet" , "Surname : sıkık", then insert other columns directly. How can I do that? Thanks for answers!
Inscription à :
Publier les commentaires (Atom)
Aucun commentaire:
Enregistrer un commentaire