i need to know how substring_index can only return all rows that match exactly the number of delimiters. In this case the .
For example this query:
SELECT
SUBSTRING_INDEX(ABC, '.', 4)
FROM xxx
only should output when the row is exactly something like this (with 4 words):
aaa.bbb.ccc.ddd
The problem is that: this row is also showed .
aaa.bbb
This will return anything where ABC has 3
.delimiters.You would need to multiply 3 by your delimiter length if you had a multi-character string for your delimiter.