We have requirement in Mysql query, to find with partial string from list of comma separated string. Then need to remove a found a string from comma separated list.
As per the below example, we need to find a string starting with "Pending" then need to remove found string from the comma separated list through Mysql query.
|-------------------|-----------------------------------------|
| Id | Tag |
|-------------------|-----------------------------------------|
| 1 | Completed, #4CHD, Pending with ABC |
|-------------------|-----------------------------------------|
| 2 | Open, Pending with Mrg, #4CHD |
|-------------------|-----------------------------------------|
| 3 | Pending with cons, Resolved |
|-------------------|-----------------------------------------|
Output should be:
|-------------------|-----------------------|
| Id | Tag |
|-------------------|-----------------------|
| 1 | Completed, #4CHD |
|-------------------|-----------------------|
| 2 | Open, #4CHD |
|-------------------|-----------------------|
| 3 | Resolved |
|-------------------|-----------------------|