Good day! I write Sql request. In the ticket_history field. name stores the name of the field, its old and new value: %%FieldName%%FaqID%%Value%%2%%OldValue%%1 . You need to return only the new Value.
Using the TRIM function, I delete the repeating start, but how can I delete %%OldValue%% and everything that follows it? Thank!
SELECT TRIM( LEADING '%%FieldName%%FaqID%%Value%%' FROM TRIM( TRAILING '%%OldValue%%' FROM `ticket_history`.`name`)), `ticket_history`.`change_time`, `users`.`first_name`, `users`.`last_name` FROM `users` INNER JOIN `ticket_history` ON `users`.`id` = `ticket_history`.`change_by` WHERE `ticket_history`.`history_type_id` = 28