jeudi 16 avril 2015

Extract with mysql

I have a field in a column (update_Action) of a table (incident) that contains information .Among his information the names that are enclosed in parenthesis. my goal is to extract these names is to store them in another column (intervenants) in the same table.



update incident set intervenants=
(substring(Update_Action,locate('(',Update_Action),locate(')',Update_Action)))
where Status='Closed'


But I got the following result: (Hamed.Ghabi): 05/01/15 13:14:11 Tunisi, instead of: Hamed.Ghabi,Sabri.Zayet,Khaled.Rajhi.


Aucun commentaire:

Enregistrer un commentaire