Short version: I need a function to escape strings for use in LIKE
expressions, so fr_e%d
becomes fr\_e\%d
.
I'm looking for escape the result of a query without the need to use replace. Because in this result I have path with this char _ inside. And because I use this result in a LIKE statement, it make the "_" a joker like start *.
I have to use LIKE because I'm doing some stuff concatenation in this same statement who need the fact that I use LIKE.
I tried ~ to replace LIKE but I will have the same problem with the char '.' because ~ is to use regex just skip this solution too.