I have the below query:
Select
Notes
From
Table
And a sample out put may be:
78652972MWGN00183HCE736430
77305311FTBCHCE735946Wheat
Training
However is what I would like as the output is an ID within the string, the ID always starts with HCE and is always 8 characters long, and where the is no ID, it would return No Machine ID
So my desired out put for the above would be:
HCE736430
HCE735946
No Machine Id
How can I achieve this ?
I have looked at using SUBSTRING, but cannot search for the HCE part.
I am currently doing this in Excel using MID and SEARCH:
=MID(A2,SEARCH("HCE",A2),9)