i would like to replace string in my query but only on the end of the string this is my example:
SET @exampleString = 'example_a_chapter_a';
SELECT REPLACE(@exampleString ,'_a','_b1');
Result what I get is this: example_b1_chapter_b1 But i would like this: example_a_chapter_b1
But there can be more time the '_a' in the string as this 'example_a_type_a_chapter_a', but i would like to replace just the end '_a' of the string.
Thanks for you help