Assuming needle is required, the following 2 results were found.
memory aids for me so that I don't have to keep looking them up: MySQL T-SQL Strings String Replace REPLACE(haystack,needle,replacement) REPLACE(haystack,needle,replacement) String Position INSTR(haystack, needle) LOCATE(needle, haystack [, offset])...
sake, I'm assigning this string to the variable "haystack". How? Perhaps we should determine the position of the last needle first (reverse the haystack string and find needle): DECLARE @Haystack VARCHAR(31); SET @Haystack =...