I have a MySQL table in which multiple values occurs in some rows. In the example below such values are separated by vertical bar (|).
+---------+------+
| cui | type |
+---------+------+
| 100 | A |
| 101|102 | A |
| 103 | B |
| 104|103 | C |
+---------+------+
I wonder how to retrieve only the first value if multiple values are present. For example, the table above should be returned as
+---------+------+
| cui | type |
+---------+------+
| 100 | A |
| 101 | A |
| 103 | B |
| 104 | C |
+---------+------+
Any suggestions are greatly welcome.