Suppose I have a table with the following fields:
-------------------
Customer Model
-------------------
A abc
B abc|xyz
C xyz|cde
How do I count the number of occurrences of abc, xyz, and cde? Thanks!
Suppose I have a table with the following fields:
-------------------
Customer Model
-------------------
A abc
B abc|xyz
C xyz|cde
How do I count the number of occurrences of abc, xyz, and cde? Thanks!
SUBSTRING_INDEX is your friend. You can compare it with a query like this:
SELECT *
FROM yourTable
WHERE
SUBSTRING_INDEX( Model , "|", 1) = "xyz" OR
SUBSTRING_INDEX( Model , "|", -1) = "xyz";