Example of splitting a field using the colon as a delimiter.
SELECT ref,
SUBSTRING(ref, 1, CHARINDEX(‘:’, ref)-1) AS Book,
SUBSTRING(ref, CHARINDEX(‘:’, ref)+1, LEN(ref)) AS Chap
FROM _BibleTest;
Example of splitting a field using the colon as a delimiter.
SELECT ref,
SUBSTRING(ref, 1, CHARINDEX(‘:’, ref)-1) AS Book,
SUBSTRING(ref, CHARINDEX(‘:’, ref)+1, LEN(ref)) AS Chap
FROM _BibleTest;