I wonder if there is a neat efficient way to search for two strings using charindex.
In the below example, I want to search for characters around either “1” OR “2”, in the below it is searching for “1”. Does anyone have any ideas on how to look for both at the same time?
select client, number, tag_value, SUBSTRING(tag_value, charindex(‘1’, tag_value)-4, 6) from dbo.tag_history
Thanks in advance!