I have a log field (QuoteLog) that contains a log of the row, in a table called (aQuote). It contains data like this:
steve marked down payment received 7/15/2016
steve created quote on 6/28/2016
What I need to do is select the dates out of these strings that are preceded by 'down payment received '
I have this:
SELECT RIGHT(QuoteLog, (CHARINDEX('%down payment received',REVERSE(QuoteLog),0))-1) FROM aQuote where QuoteDownPaymentReceived = 1
but this does not work because I can't use charindex and it also does not limit the length. I know how to do this in something like C++ but would rather simply do it in the server if I can help it.