chris-schmitz
01/28/2023, 9:25 AMcast( value as UNSIGNED)
stops processing value
as soon as it encounters something that does not represent a number, iirc. So here it would stop at the comma.
What you could try is to build the join on a LIKE clause:
ON x.opt_code LIKE concat( '%', y.opt_code_id, '%')
Definitely not the fastest join, but, it should work