The function Position(text, search string, start, occurrence) scans the supplied text for the nth occurrence of a search string, starting where you indicate with start.
Here’s the neat bit: a negative occurrence value causes the scan to go in the opposite direction. The following gives the position of the LAST occurrance of string in text:
position(text, string, length(text), -1)



November 13th, 2011 at 11:16 pm
That’s awesome!