I'm dealing with an old badly designed database in transition to a new system.
Products are associated with categories in the following way:
|------------|------------------|
| product_id | category_ids |
|------------|------------------|
| 12 | 34,52,105 |
|------------|------------------|
| 14 | 34,52,192 |
|------------|------------------|
I'm trying to figure out how to simply select a list of all unique category IDs from that column, like so:
|-------------|
| category_id |
|-------------|
| 34 |
|-------------|
| 52 |
|-------------|
| 105 |
|-------------|
| 192 |
|-------------|
Any help would be appreciated, thank you!