Yassine edouiri Yassine edouiri - 1 year ago 71
SQL Question

MYSQL query will remove characters from a string

I would like to implement a query in MYSQL that will remove the characters before the space

For example :

UA 016

i want to remove 'UA ' with the space , and only keep


here is the query statements:

update field_data_field_id set field_id_value = '.... what i need here';

Thanks in advance

Answer Source
UPDATE field_data_field_id 
SET field_id_value=SUBSTRING_INDEX(
                     SUBSTRING_INDEX(field_id_value,' ',2),' ',-1);
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download