add batch remove batch split batch comment selection show hidden batches hide batch highlight batch
db<>fiddle
donate feedback about
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
WITH yourTable AS (
SELECT 'Date = ''2018-10-09'' AND COATitle = ''Hello Tonia'' AND Name = ''Warner Bros''' AS word UNION ALL
SELECT 'COATitle = ''Hello'' AND Name = ''Warner Bros'' Date = ''2018-10-09'' AND ' UNION ALL
SELECT 'COATitle = ''Hello World'' AND Date = ''2018-10-09'' AND Name = ''Warner Bros''' UNION ALL
SELECT 'COATitle = ''Piece of Cake'' AND Date = ''2018-10-09'' AND Name = ''Tim Martin'''
)

SELECT
word,
SUBSTRING(word,
CHARINDEX('COATitle = ''', word) + 12,
CHARINDEX('''', word, CHARINDEX('COATitle = ''', word) + 12) - CHARINDEX('COATitle = ''', word) - 12) AS target
FROM yourTable;
word target
Date = '2018-10-09' AND COATitle = 'Hello Tonia' AND Name = 'Warner Bros' Hello Tonia
COATitle = 'Hello' AND Name = 'Warner Bros' Date = '2018-10-09' AND Hello
COATitle = 'Hello World' AND Date = '2018-10-09' AND Name = 'Warner Bros' Hello World
COATitle = 'Piece of Cake' AND Date = '2018-10-09' AND Name = 'Tim Martin' Piece of Cake