I need to create a SQL Query. This query need to select from a table where a column contains regular expression.
For example, I have those values:
TABLE test (name)
- XHRTCNW
- DHRTRRR
- XHRTCOP
- CPHCTPC
- CDDHRTF
- PEOFOFD
I want to select all the data who have "HRT" after 1 char (value 1, 2 and 3 - Values who looks like "-HRT---") but not those who might have "HRT" after 1 char (value 5).
So I'm not sure how to do it because a simple
SELECT *
FROM test
WHERE name LIKE "%HRT%"
will return value 1, 2, 3 and 5.
Sorry if I'm not really clear with what I want/need.