Removing the first occurrence of n digits in a string in Mysql

Viewed 69

I want to remove the first occurrence of 15 from this number. I found this way to do it but surely there is a simpler way.

select concat(Substring_index(0180154571556, '15', 1),Substring(0180154571556,Length(concat(Substring_index(0180154571556, '15', 1),'15'))+1,length(0180154571556))) as text;

--Expected result: 1804571556

1 Answers
Related